aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-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();