aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/processes.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/plugin/processes.php b/plugin/processes.php
index a560b13..934dead 100644
--- a/plugin/processes.php
+++ b/plugin/processes.php
@@ -23,6 +23,7 @@ $obj->ds_names = array(
23 'stopped' => 'Stopped ', 23 'stopped' => 'Stopped ',
24 'running' => 'Running ', 24 'running' => 'Running ',
25 'sleeping' => 'Sleeping', 25 'sleeping' => 'Sleeping',
26 'value' => 'Forks',
26); 27);
27$obj->colors = array( 28$obj->colors = array(
28 'paging' => 'ffb000', 29 'paging' => 'ffb000',
@@ -31,13 +32,24 @@ $obj->colors = array(
31 'stopped' => 'a000a0', 32 'stopped' => 'a000a0',
32 'running' => '00e000', 33 'running' => '00e000',
33 'sleeping' => '0000ff', 34 'sleeping' => '0000ff',
35 'value' => 'f0a000',
34); 36);
35$obj->width = $width; 37$obj->width = $width;
36$obj->heigth = $heigth; 38$obj->heigth = $heigth;
37 39
38$obj->rrd_title = 'Processes'; 40switch($obj->args['type'])
39$obj->rrd_vertical = 'Processes'; 41{
40$obj->rrd_format = '%5.1lf%s'; 42 case 'ps_state':
43 $obj->rrd_title = 'Processes';
44 $obj->rrd_vertical = 'Processes';
45 $obj->rrd_format = '%5.1lf%s';
46 break;
47 case 'fork_rate':
48 $obj->rrd_title = 'Fork rate';
49 $obj->rrd_vertical = 'forks/s';
50 $obj->rrd_format = '%5.1lf%s';
51 break;
52}
41 53
42collectd_flush($obj->identifiers); 54collectd_flush($obj->identifiers);
43$obj->rrd_graph(); 55$obj->rrd_graph();