diff options
Diffstat (limited to 'plugin/irq.php')
| -rw-r--r-- | plugin/irq.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/plugin/irq.php b/plugin/irq.php new file mode 100644 index 0000000..2759c0e --- /dev/null +++ b/plugin/irq.php | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd IRQ plugin | ||
| 4 | |||
| 5 | require_once $CONFIG['webdir'].'/conf/config.php'; | ||
| 6 | require_once $CONFIG['webdir'].'/type/GenericStacked.class.php'; | ||
| 7 | |||
| 8 | ## LAYOUT | ||
| 9 | # irq/ | ||
| 10 | # irq/irq-XX.rrd | ||
| 11 | |||
| 12 | # grouped | ||
| 13 | require_once $CONFIG['webdir'].'/inc/collectd.inc.php'; | ||
| 14 | $tinstance = collectd_plugindetail($host, $plugin, 'ti'); | ||
| 15 | sort($tinstance); | ||
| 16 | |||
| 17 | $obj = new Type_GenericStacked; | ||
| 18 | $obj->datadir = $CONFIG['datadir']; | ||
| 19 | $obj->path_format = '{host}/{plugin}/{type}-{tinstance}.rrd'; | ||
| 20 | $obj->args = array( | ||
| 21 | 'host' => $host, | ||
| 22 | 'plugin' => $plugin, | ||
| 23 | 'pinstance' => $pinstance, | ||
| 24 | 'type' => $type, | ||
| 25 | 'tinstance' => $tinstance, | ||
| 26 | ); | ||
| 27 | $obj->data_sources = array('value'); | ||
| 28 | $obj->ds_names = NULL; | ||
| 29 | $obj->colors = NULL; | ||
| 30 | $obj->width = $width; | ||
| 31 | $obj->heigth = $heigth; | ||
| 32 | $obj->seconds = $seconds; | ||
| 33 | |||
| 34 | $obj->rrd_title = "Interrupts on $host"; | ||
| 35 | $obj->rrd_vertical = 'IRQs/s'; | ||
| 36 | $obj->rrd_format = '%6.1lf'; | ||
| 37 | |||
| 38 | $obj->rrd_graph(); | ||
| 39 | |||
| 40 | ?> | ||
