aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type
diff options
context:
space:
mode:
authorPim van den Berg2012-07-15 11:46:50 +0200
committerPim van den Berg2012-07-15 11:46:50 +0200
commit69bea69bcdaf90a72c183b720656419ce5622fa4 (patch)
tree4f1bfd1478a0087075e5d2a0623a55c5c343fc4b /type
parentorder graphs by pi, t, ti (diff)
downloadapt-panopticon_cgp-69bea69bcdaf90a72c183b720656419ce5622fa4.zip
apt-panopticon_cgp-69bea69bcdaf90a72c183b720656419ce5622fa4.tar.gz
apt-panopticon_cgp-69bea69bcdaf90a72c183b720656419ce5622fa4.tar.bz2
apt-panopticon_cgp-69bea69bcdaf90a72c183b720656419ce5622fa4.tar.xz
type/GenericIO: only use raw totals when no scale is set
When scale is set, the total will be set twice (also in part below), which will result in this error: "ERROR: Attempting to reuse 'tot_98574167'" Bug introduced in commit: v0.3-25-g19ed46a [type/GenericIO: add total calculations in IO graphs]
Diffstat (limited to 'type')
-rw-r--r--type/GenericIO.class.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/type/GenericIO.class.php b/type/GenericIO.class.php
index bc0fdef..3a56fb3 100644
--- a/type/GenericIO.class.php
+++ b/type/GenericIO.class.php
@@ -17,7 +17,8 @@ class Type_GenericIO extends Type_Default {
17 $rrdgraph[] = sprintf('DEF:min_%s%s="%s":%s:MIN', crc32hex($sources[$i]), $raw, $this->rrd_escape($this->files[$tinstance]), $ds); 17 $rrdgraph[] = sprintf('DEF:min_%s%s="%s":%s:MIN', crc32hex($sources[$i]), $raw, $this->rrd_escape($this->files[$tinstance]), $ds);
18 $rrdgraph[] = sprintf('DEF:avg_%s%s="%s":%s:AVERAGE', crc32hex($sources[$i]), $raw, $this->rrd_escape($this->files[$tinstance]), $ds); 18 $rrdgraph[] = sprintf('DEF:avg_%s%s="%s":%s:AVERAGE', crc32hex($sources[$i]), $raw, $this->rrd_escape($this->files[$tinstance]), $ds);
19 $rrdgraph[] = sprintf('DEF:max_%s%s="%s":%s:MAX', crc32hex($sources[$i]), $raw, $this->rrd_escape($this->files[$tinstance]), $ds); 19 $rrdgraph[] = sprintf('DEF:max_%s%s="%s":%s:MAX', crc32hex($sources[$i]), $raw, $this->rrd_escape($this->files[$tinstance]), $ds);
20 $rrdgraph[] = sprintf('VDEF:tot_%1$s=avg_%1$s%2$s,TOTAL', crc32hex($sources[$i]), $raw); 20 if (!$raw)
21 $rrdgraph[] = sprintf('VDEF:tot_%s=avg_%1$s,TOTAL', crc32hex($sources[$i]));
21 $i++; 22 $i++;
22 } 23 }
23 } 24 }