diff options
author | Manuel CISSÉ | 2010-02-23 10:56:53 +0100 |
---|---|---|
committer | Pim van den Berg | 2010-03-01 20:31:31 +0100 |
commit | 98f4edb7ead195bbe9080a39b1e3d90b6fe1c196 (patch) | |
tree | 0227b1ba680a6748c3adf58663f60dacfcee6eeb /plugin/processes.php | |
parent | interface traffic in bytes per second (instead of bits) (diff) | |
download | apt-panopticon_cgp-98f4edb7ead195bbe9080a39b1e3d90b6fe1c196.zip apt-panopticon_cgp-98f4edb7ead195bbe9080a39b1e3d90b6fe1c196.tar.gz apt-panopticon_cgp-98f4edb7ead195bbe9080a39b1e3d90b6fe1c196.tar.bz2 apt-panopticon_cgp-98f4edb7ead195bbe9080a39b1e3d90b6fe1c196.tar.xz |
add fork rate graph to processes plugin
Diffstat (limited to 'plugin/processes.php')
-rw-r--r-- | plugin/processes.php | 18 |
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'; | 40 | switch($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 | ||
42 | collectd_flush($obj->identifiers); | 54 | collectd_flush($obj->identifiers); |
43 | $obj->rrd_graph(); | 55 | $obj->rrd_graph(); |