aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type/GenericIO.class.php
diff options
context:
space:
mode:
authoryur2011-04-05 19:43:31 +0200
committerPim van den Berg2011-04-05 19:43:31 +0200
commit19ed46a5fd04ef2886d3c0306b4b0e13f0f43ac6 (patch)
tree6946885042674d805001cbb1ce1dee3b7b5f2c75 /type/GenericIO.class.php
parentplugin/postgresql: support for all predefined queries (diff)
downloadapt-panopticon_cgp-19ed46a5fd04ef2886d3c0306b4b0e13f0f43ac6.zip
apt-panopticon_cgp-19ed46a5fd04ef2886d3c0306b4b0e13f0f43ac6.tar.gz
apt-panopticon_cgp-19ed46a5fd04ef2886d3c0306b4b0e13f0f43ac6.tar.bz2
apt-panopticon_cgp-19ed46a5fd04ef2886d3c0306b4b0e13f0f43ac6.tar.xz
type/GenericIO: add total calculations in IO graphs
Diffstat (limited to 'type/GenericIO.class.php')
-rw-r--r--type/GenericIO.class.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/type/GenericIO.class.php b/type/GenericIO.class.php
index 944c82e..18a27ea 100644
--- a/type/GenericIO.class.php
+++ b/type/GenericIO.class.php
@@ -17,6 +17,7 @@ class Type_GenericIO extends Type_Default {
17 $rrdgraph[] = sprintf('DEF:min_%s%s=%s:%s:MIN', crc32hex($sources[$i]), $raw, $this->files[$tinstance], $ds); 17 $rrdgraph[] = sprintf('DEF:min_%s%s=%s:%s:MIN', crc32hex($sources[$i]), $raw, $this->files[$tinstance], $ds);
18 $rrdgraph[] = sprintf('DEF:avg_%s%s=%s:%s:AVERAGE', crc32hex($sources[$i]), $raw, $this->files[$tinstance], $ds); 18 $rrdgraph[] = sprintf('DEF:avg_%s%s=%s:%s:AVERAGE', crc32hex($sources[$i]), $raw, $this->files[$tinstance], $ds);
19 $rrdgraph[] = sprintf('DEF:max_%s%s=%s:%s:MAX', crc32hex($sources[$i]), $raw, $this->files[$tinstance], $ds); 19 $rrdgraph[] = sprintf('DEF:max_%s%s=%s:%s:MAX', crc32hex($sources[$i]), $raw, $this->files[$tinstance], $ds);
20 $rrdgraph[] = sprintf('VDEF:tot_%1$s=avg_%1$s%2$s,TOTAL', crc32hex($sources[$i]), $raw);
20 $i++; 21 $i++;
21 } 22 }
22 } 23 }
@@ -27,6 +28,7 @@ class Type_GenericIO extends Type_Default {
27 $rrdgraph[] = sprintf('CDEF:min_%s=min_%1$s_raw,%s,*', crc32hex($sources[$i]), $this->scale); 28 $rrdgraph[] = sprintf('CDEF:min_%s=min_%1$s_raw,%s,*', crc32hex($sources[$i]), $this->scale);
28 $rrdgraph[] = sprintf('CDEF:avg_%s=avg_%1$s_raw,%s,*', crc32hex($sources[$i]), $this->scale); 29 $rrdgraph[] = sprintf('CDEF:avg_%s=avg_%1$s_raw,%s,*', crc32hex($sources[$i]), $this->scale);
29 $rrdgraph[] = sprintf('CDEF:max_%s=max_%1$s_raw,%s,*', crc32hex($sources[$i]), $this->scale); 30 $rrdgraph[] = sprintf('CDEF:max_%s=max_%1$s_raw,%s,*', crc32hex($sources[$i]), $this->scale);
31 $rrdgraph[] = sprintf('VDEF:tot_%1$s=avg_%1$s,TOTAL', crc32hex($sources[$i]));
30 $i++; 32 $i++;
31 } 33 }
32 } 34 }
@@ -52,7 +54,8 @@ class Type_GenericIO extends Type_Default {
52 $rrdgraph[] = sprintf('GPRINT:min_%s:MIN:\'%s Min,\'', crc32hex($source), $this->rrd_format); 54 $rrdgraph[] = sprintf('GPRINT:min_%s:MIN:\'%s Min,\'', crc32hex($source), $this->rrd_format);
53 $rrdgraph[] = sprintf('GPRINT:avg_%s:AVERAGE:\'%s Avg,\'', crc32hex($source), $this->rrd_format); 55 $rrdgraph[] = sprintf('GPRINT:avg_%s:AVERAGE:\'%s Avg,\'', crc32hex($source), $this->rrd_format);
54 $rrdgraph[] = sprintf('GPRINT:max_%s:MAX:\'%s Max,\'', crc32hex($source), $this->rrd_format); 56 $rrdgraph[] = sprintf('GPRINT:max_%s:MAX:\'%s Max,\'', crc32hex($source), $this->rrd_format);
55 $rrdgraph[] = sprintf('GPRINT:avg_%s:LAST:\'%s Last\l\'', crc32hex($source), $this->rrd_format); 57 $rrdgraph[] = sprintf('GPRINT:avg_%s:LAST:\'%s Last\'', crc32hex($source), $this->rrd_format);
58 $rrdgraph[] = sprintf('GPRINT:tot_%s:\'%s Total\l\'',crc32hex($source), $this->rrd_format);
56 } 59 }
57 60
58 return $rrdgraph; 61 return $rrdgraph;