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/netlink.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/netlink.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/netlink.php b/plugin/netlink.php index 423775d..77c0c48 100644 --- a/plugin/netlink.php +++ b/plugin/netlink.php | |||
@@ -64,7 +64,8 @@ switch($obj->args['type']) { | |||
64 | 'tx' => '00b000', | 64 | 'tx' => '00b000', |
65 | ); | 65 | ); |
66 | $obj->rrd_title = sprintf('Interface Traffic (%s)', $obj->args['pinstance']); | 66 | $obj->rrd_title = sprintf('Interface Traffic (%s)', $obj->args['pinstance']); |
67 | $obj->rrd_vertical = 'Bytes/s'; | 67 | $obj->rrd_vertical = sprintf('%s/s', ucfirst($CONFIG['datasize'])); |
68 | $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; | ||
68 | break; | 69 | break; |
69 | case 'if_packets': | 70 | case 'if_packets': |
70 | $obj->data_sources = array('rx', 'tx'); | 71 | $obj->data_sources = array('rx', 'tx'); |