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/memcached.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 'plugin/memcached.php')
-rw-r--r-- | plugin/memcached.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugin/memcached.php b/plugin/memcached.php index e011c9e..accf6b3 100644 --- a/plugin/memcached.php +++ b/plugin/memcached.php | |||
@@ -37,7 +37,8 @@ switch(GET('t')) { | |||
37 | 'free' => '0000ff', | 37 | 'free' => '0000ff', |
38 | ); | 38 | ); |
39 | $obj->rrd_title = 'Memcached Memory Usage'; | 39 | $obj->rrd_title = 'Memcached Memory Usage'; |
40 | $obj->rrd_vertical = 'bytes'; | 40 | $obj->rrd_vertical = ucfirst($CONFIG['datasize']); |
41 | $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; | ||
41 | break; | 42 | break; |
42 | 43 | ||
43 | # memcached_command-(flush|get|set).rrd | 44 | # memcached_command-(flush|get|set).rrd |
@@ -104,7 +105,8 @@ switch(GET('t')) { | |||
104 | 'tx' => '00b000', | 105 | 'tx' => '00b000', |
105 | ); | 106 | ); |
106 | $obj->rrd_title = 'Memcached Network Traffic'; | 107 | $obj->rrd_title = 'Memcached Network Traffic'; |
107 | $obj->rrd_vertical = 'Bytes'; | 108 | $obj->rrd_vertical = ucfirst($CONFIG['datasize']); |
109 | $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; | ||
108 | break; | 110 | break; |
109 | # memcached_ops-(evictions|hits|misses).rrd | 111 | # memcached_ops-(evictions|hits|misses).rrd |
110 | case 'memcached_ops': | 112 | case 'memcached_ops': |