diff options
author | Pim van den Berg | 2011-06-15 22:47:04 +0200 |
---|---|---|
committer | Pim van den Berg | 2011-06-15 23:05:07 +0200 |
commit | 56c3e85275f09af53ded3c5e10340f6847047a78 (patch) | |
tree | ab655ac7ffac0cc7dfb4a92f3261c9237c8117f9 /plugin/contextswitch.php | |
parent | plugin/conntrack: collectd 5 compatibility (diff) | |
download | apt-panopticon_cgp-56c3e85275f09af53ded3c5e10340f6847047a78.zip apt-panopticon_cgp-56c3e85275f09af53ded3c5e10340f6847047a78.tar.gz apt-panopticon_cgp-56c3e85275f09af53ded3c5e10340f6847047a78.tar.bz2 apt-panopticon_cgp-56c3e85275f09af53ded3c5e10340f6847047a78.tar.xz |
plugin/contextswitch: collectd 5 compatibility
Diffstat (limited to '')
-rw-r--r-- | plugin/contextswitch.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin/contextswitch.php b/plugin/contextswitch.php index 47851e6..8a2036f 100644 --- a/plugin/contextswitch.php +++ b/plugin/contextswitch.php | |||
@@ -10,7 +10,7 @@ require_once 'inc/collectd.inc.php'; | |||
10 | # contextswitch/contextswitch.rrd | 10 | # contextswitch/contextswitch.rrd |
11 | 11 | ||
12 | $obj = new Type_Default($CONFIG); | 12 | $obj = new Type_Default($CONFIG); |
13 | $obj->data_sources = array('contextswitches'); | 13 | $obj->data_sources = array('value'); |
14 | $obj->ds_names = array( | 14 | $obj->ds_names = array( |
15 | 'contextswitches' => 'Context switches', | 15 | 'contextswitches' => 'Context switches', |
16 | ); | 16 | ); |
@@ -23,5 +23,9 @@ $obj->rrd_title = 'Context switches'; | |||
23 | $obj->rrd_vertical = 'switch per second Bits'; | 23 | $obj->rrd_vertical = 'switch per second Bits'; |
24 | $obj->rrd_format = '%4.0lf'; | 24 | $obj->rrd_format = '%4.0lf'; |
25 | 25 | ||
26 | # backwards compatibility | ||
27 | if ($CONFIG['version'] < 5) | ||
28 | $obj->data_sources = array('contextswitches'); | ||
29 | |||
26 | collectd_flush($obj->identifiers); | 30 | collectd_flush($obj->identifiers); |
27 | $obj->rrd_graph(); | 31 | $obj->rrd_graph(); |