contrib/collection.cgi: Display MySQL traffic as bits/s, not bytes/s.
authorFlorian Forster <octo@huhu.verplant.org>
Sun, 2 Sep 2007 17:43:03 +0000 (19:43 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Sun, 2 Sep 2007 17:43:03 +0000 (19:43 +0200)
contrib/collection.cgi

index 09bbec7..a40db87 100755 (executable)
@@ -1606,14 +1606,13 @@ sub load_graph_definitions
     'GPRINT:val_max:MAX:%5.2lf Max,',
     'GPRINT:val_avg:LAST:%5.2lf Last'
     ],
-    mysql_octets => ['-v', 'Bytes/s',
+    mysql_octets => ['-v', 'Bits/s',
     'DEF:out_min={file}:tx:MIN',
     'DEF:out_avg={file}:tx:AVERAGE',
     'DEF:out_max={file}:tx:MAX',
     'DEF:inc_min={file}:rx:MIN',
     'DEF:inc_avg={file}:rx:AVERAGE',
     'DEF:inc_max={file}:rx:MAX',
-    'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
     'CDEF:mytime=out_avg,TIME,TIME,IF',
     'CDEF:sample_len_raw=mytime,PREV(mytime),-',
     'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
@@ -1621,18 +1620,25 @@ sub load_graph_definitions
     'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
     'CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*',
     'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
-    "AREA:out_avg#$HalfGreen",
-    "AREA:inc_avg#$HalfBlue",
+    'CDEF:out_bit_min=out_min,8,*',
+    'CDEF:out_bit_avg=out_avg,8,*',
+    'CDEF:out_bit_max=out_max,8,*',
+    'CDEF:inc_bit_min=inc_min,8,*',
+    'CDEF:inc_bit_avg=inc_avg,8,*',
+    'CDEF:inc_bit_max=inc_max,8,*',
+    'CDEF:overlap=out_bit_avg,inc_bit_avg,GT,inc_bit_avg,out_bit_avg,IF',
+    "AREA:out_bit_avg#$HalfGreen",
+    "AREA:inc_bit_avg#$HalfBlue",
     "AREA:overlap#$HalfBlueGreen",
-    "LINE1:out_avg#$FullGreen:Written",
-    'GPRINT:out_avg:AVERAGE:%5.1lf%s Avg,',
-    'GPRINT:out_max:MAX:%5.1lf%s Max,',
-    'GPRINT:out_avg:LAST:%5.1lf%s Last',
+    "LINE1:out_bit_avg#$FullGreen:Written",
+    'GPRINT:out_bit_avg:AVERAGE:%5.1lf%s Avg,',
+    'GPRINT:out_bit_max:MAX:%5.1lf%s Max,',
+    'GPRINT:out_bit_avg:LAST:%5.1lf%s Last',
     'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
-    "LINE1:inc_avg#$FullBlue:Read   ",
-    'GPRINT:inc_avg:AVERAGE:%5.1lf%s Avg,',
-    'GPRINT:inc_max:MAX:%5.1lf%s Max,',
-    'GPRINT:inc_avg:LAST:%5.1lf%s Last',
+    "LINE1:inc_bit_avg#$FullBlue:Read   ",
+    'GPRINT:inc_bit_avg:AVERAGE:%5.1lf%s Avg,',
+    'GPRINT:inc_bit_max:MAX:%5.1lf%s Max,',
+    'GPRINT:inc_bit_avg:LAST:%5.1lf%s Last',
     'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
     ],
     mysql_qcache => ['-v', 'Queries/s',