aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAurélien ROUGEMONT2011-04-18 20:02:00 +0200
committerPim van den Berg2011-04-18 20:02:00 +0200
commite7b54cf7ef457f9a7358efb7c99ab4c44631d925 (patch)
tree2edd0f147a06f41a315f1efa81e9d2898cd720c9
parentplugin: deduplicate rrd_format code (diff)
downloadapt-panopticon_cgp-e7b54cf7ef457f9a7358efb7c99ab4c44631d925.zip
apt-panopticon_cgp-e7b54cf7ef457f9a7358efb7c99ab4c44631d925.tar.gz
apt-panopticon_cgp-e7b54cf7ef457f9a7358efb7c99ab4c44631d925.tar.bz2
apt-panopticon_cgp-e7b54cf7ef457f9a7358efb7c99ab4c44631d925.tar.xz
plugin: add contextswitch plugin
-rw-r--r--plugin/contextswitch.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/plugin/contextswitch.php b/plugin/contextswitch.php
new file mode 100644
index 0000000..ddb3276
--- /dev/null
+++ b/plugin/contextswitch.php
@@ -0,0 +1,27 @@
1<?php
2
3# Collectd Entropy plugin
4
5require_once 'conf/common.inc.php';
6require_once 'type/Default.class.php';
7require_once 'inc/collectd.inc.php';
8
9## LAYOUT
10# contextswitch/contextswitch.rrd
11
12$obj = new Type_Default($CONFIG);
13$obj->data_sources = array('contextswitches');
14$obj->ds_names = array(
15 'contextswitches' => 'Context switches',
16);
17$obj->colors = array(
18 'contextswitches' => '0000f0',
19);
20$obj->width = $width;
21$obj->heigth = $heigth;
22$obj->rrd_title = 'Context switches';
23$obj->rrd_vertical = 'switch per second Bits';
24$obj->rrd_format = '%4.0lf';
25
26collectd_flush($obj->identifiers);
27$obj->rrd_graph();