diff options
Diffstat (limited to 'plugin/processes.php')
| -rw-r--r-- | plugin/processes.php | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/plugin/processes.php b/plugin/processes.php index 65e1ddd..1487568 100644 --- a/plugin/processes.php +++ b/plugin/processes.php | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | require_once 'conf/common.inc.php'; | 5 | require_once 'conf/common.inc.php'; |
| 6 | require_once 'type/GenericStacked.class.php'; | 6 | require_once 'type/GenericStacked.class.php'; |
| 7 | require_once 'inc/collectd.inc.php'; | ||
| 7 | 8 | ||
| 8 | ## LAYOUT | 9 | ## LAYOUT |
| 9 | # processes/ | 10 | # processes/ |
| @@ -14,20 +15,7 @@ require_once 'type/GenericStacked.class.php'; | |||
| 14 | # processes/ps_state-running.rrd | 15 | # processes/ps_state-running.rrd |
| 15 | # processes/ps_state-sleeping.rrd | 16 | # processes/ps_state-sleeping.rrd |
| 16 | 17 | ||
| 17 | # grouped | 18 | $obj = new Type_GenericStacked($CONFIG['datadir']); |
| 18 | require_once 'inc/collectd.inc.php'; | ||
| 19 | $tinstance = collectd_plugindetail($host, $plugin, 'ti'); | ||
| 20 | |||
| 21 | $obj = new Type_GenericStacked; | ||
| 22 | $obj->datadir = $CONFIG['datadir']; | ||
| 23 | $obj->args = array( | ||
| 24 | 'host' => $host, | ||
| 25 | 'plugin' => $plugin, | ||
| 26 | 'pinstance' => $pinstance, | ||
| 27 | 'type' => $type, | ||
| 28 | 'tinstance' => $tinstance, | ||
| 29 | ); | ||
| 30 | $obj->data_sources = array('value'); | ||
| 31 | $obj->ds_names = array( | 19 | $obj->ds_names = array( |
| 32 | 'paging' => 'Paging ', | 20 | 'paging' => 'Paging ', |
| 33 | 'blocked' => 'Blocked ', | 21 | 'blocked' => 'Blocked ', |
| @@ -46,14 +34,12 @@ $obj->colors = array( | |||
| 46 | ); | 34 | ); |
| 47 | $obj->width = $width; | 35 | $obj->width = $width; |
| 48 | $obj->heigth = $heigth; | 36 | $obj->heigth = $heigth; |
| 49 | $obj->seconds = $seconds; | ||
| 50 | 37 | ||
| 51 | $obj->rrd_title = 'Processes'; | 38 | $obj->rrd_title = 'Processes'; |
| 52 | $obj->rrd_vertical = 'Processes'; | 39 | $obj->rrd_vertical = 'Processes'; |
| 53 | $obj->rrd_format = '%5.1lf%s'; | 40 | $obj->rrd_format = '%5.1lf%s'; |
| 54 | 41 | ||
| 55 | collectd_flush(ident_from_args($obj->args)); | 42 | collectd_flush($obj->identifiers); |
| 56 | |||
| 57 | $obj->rrd_graph(); | 43 | $obj->rrd_graph(); |
| 58 | 44 | ||
| 59 | ?> | 45 | ?> |
