diff options
author | Pim van den Berg | 2012-08-10 18:56:30 +0200 |
---|---|---|
committer | Pim van den Berg | 2012-08-10 19:00:16 +0200 |
commit | fd04134830d3111c137b47c7ba25a049ab597715 (patch) | |
tree | c2390f06640f2127ab3e987cd3bdaf1d639b3dc2 /plugin/memory.php | |
parent | type: add scale support to default/generic stacked types (diff) | |
download | apt-panopticon_cgp-fd04134830d3111c137b47c7ba25a049ab597715.zip apt-panopticon_cgp-fd04134830d3111c137b47c7ba25a049ab597715.tar.gz apt-panopticon_cgp-fd04134830d3111c137b47c7ba25a049ab597715.tar.bz2 apt-panopticon_cgp-fd04134830d3111c137b47c7ba25a049ab597715.tar.xz |
introduce config option datasize to show graphs in bits or bytes
Config setting $CONFIG['datasize'] can be set to bits or bytes to show graph
data in bits or bytes.
Inspired-by: Neptune Ning (Plan) <frostyplanet@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | plugin/memory.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/memory.php b/plugin/memory.php index 14779e2..afccc55 100644 --- a/plugin/memory.php +++ b/plugin/memory.php | |||
@@ -33,7 +33,8 @@ $obj->width = $width; | |||
33 | $obj->heigth = $heigth; | 33 | $obj->heigth = $heigth; |
34 | 34 | ||
35 | $obj->rrd_title = 'Physical memory utilization'; | 35 | $obj->rrd_title = 'Physical memory utilization'; |
36 | $obj->rrd_vertical = 'Bytes'; | 36 | $obj->rrd_vertical = ucfirst($CONFIG['datasize']); |
37 | $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; | ||
37 | $obj->rrd_format = '%5.1lf%s'; | 38 | $obj->rrd_format = '%5.1lf%s'; |
38 | 39 | ||
39 | collectd_flush($obj->identifiers); | 40 | collectd_flush($obj->identifiers); |