Changed the `cpu' graph to display percentages
authorocto <octo>
Fri, 23 Dec 2005 06:37:36 +0000 (06:37 +0000)
committerocto <octo>
Fri, 23 Dec 2005 06:37:36 +0000 (06:37 +0000)
contrib/museum/collection.cgi

index 07f8dc7..4b31dfb 100755 (executable)
@@ -62,17 +62,30 @@ our $GraphDefs;
                        'DEF:syst_avg={file}:syst:AVERAGE',
                        'DEF:syst_min={file}:syst:MIN',
                        'DEF:syst_max={file}:syst:MAX',
+                       'DEF:idle_avg={file}:idle:AVERAGE',
+                       'DEF:idle_min={file}:idle:MIN',
+                       'DEF:idle_max={file}:idle:MAX',
                        'DEF:wait_avg={file}:wait:AVERAGE',
                        'DEF:wait_min={file}:wait:MIN',
                        'DEF:wait_max={file}:wait:MAX',
                        'CDEF:user_avg_notnull=user_avg,UN,0,user_avg,IF',
                        'CDEF:nice_avg_notnull=nice_avg,UN,0,nice_avg,IF',
                        'CDEF:syst_avg_notnull=syst_avg,UN,0,syst_avg,IF',
+                       'CDEF:idle_avg_notnull=idle_avg,UN,0,idle_avg,IF',
                        'CDEF:wait_avg_notnull=wait_avg,UN,0,wait_avg,IF',
-                       'CDEF:nice_acc=syst_avg,wait_avg_notnull,user_avg,nice_avg_notnull,+,+,+',
-                       'CDEF:user_acc=syst_avg,wait_avg_notnull,user_avg,+,+',
-                       'CDEF:wait_acc=syst_avg,wait_avg_notnull,+',
-                       'CDEF:syst_acc=syst_avg',
+                       'CDEF:totl_avg_notnull=user_avg_notnull,nice_avg_notnull,+,syst_avg_notnull,+,idle_avg_notnull,+,wait_avg_notnull,+',
+                       'CDEF:user_avg_pct=user_avg_notnull,100,*,totl_avg_notnull,/',
+                       'CDEF:nice_avg_pct=nice_avg_notnull,100,*,totl_avg_notnull,/',
+                       'CDEF:syst_avg_pct=syst_avg_notnull,100,*,totl_avg_notnull,/',
+                       'CDEF:wait_avg_pct=wait_avg_notnull,100,*,totl_avg_notnull,/',
+                       'CDEF:nice_acc=syst_avg_pct,wait_avg_pct,user_avg_pct,nice_avg_pct,+,+,+',
+                       'CDEF:user_acc=syst_avg_pct,wait_avg_pct,user_avg_pct,+,+',
+                       'CDEF:wait_acc=syst_avg_pct,wait_avg_pct,+',
+                       'CDEF:syst_acc=syst_avg_pct',
+#                      'CDEF:nice_acc=syst_avg_notnull,wait_avg_notnull,user_avg_notnull,nice_avg_notnull,+,+,+',
+#                      'CDEF:user_acc=syst_avg_notnull,wait_avg_notnull,user_avg_notnull,+,+',
+#                      'CDEF:wait_acc=syst_avg_notnull,wait_avg_notnull,+',
+#                      'CDEF:syst_acc=syst_avg_notnull',
                        "AREA:nice_acc#$HalfGreen",
                        "AREA:user_acc#$HalfBlue",
                        "AREA:wait_acc#$HalfYellow",
@@ -532,7 +545,7 @@ our $GraphDefs;
                            'GPRINT:users_avg:AVERAGE:%4.1lf Average,',
                            'GPRINT:users_max:MAX:%4.1lf Max,',
                            'GPRINT:users_avg:LAST:%4.1lf Last\l'
-               ],
+               ]
        };
        $GraphDefs->{'disk'} = $GraphDefs->{'partition'};
        $GraphDefs->{'meminfo'} = $GraphDefs->{'memory'};