diff options
| author | Pim van den Berg | 2010-10-10 12:29:59 +0200 |
|---|---|---|
| committer | Pim van den Berg | 2010-10-10 12:31:38 +0200 |
| commit | d24eea595474f559627ea1ef85a7f2065bc7e92d (patch) | |
| tree | 65b3ff36c1574f5c06c3e3ee653151cc5e96c8dd | |
| parent | update changelog to v0.3 (diff) | |
| download | apt-panopticon_cgp-d24eea595474f559627ea1ef85a7f2065bc7e92d.zip apt-panopticon_cgp-d24eea595474f559627ea1ef85a7f2065bc7e92d.tar.gz apt-panopticon_cgp-d24eea595474f559627ea1ef85a7f2065bc7e92d.tar.bz2 apt-panopticon_cgp-d24eea595474f559627ea1ef85a7f2065bc7e92d.tar.xz | |
plugin: add cpufreq plugin
| -rw-r--r-- | plugin/cpufreq.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/plugin/cpufreq.php b/plugin/cpufreq.php new file mode 100644 index 0000000..ef2162b --- /dev/null +++ b/plugin/cpufreq.php | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd CPUfreq plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/Default.class.php'; | ||
| 7 | require_once 'inc/collectd.inc.php'; | ||
| 8 | |||
| 9 | ## LAYOUT | ||
| 10 | # cpufreq/cpufreq-X.rrd | ||
| 11 | |||
| 12 | $obj = new Type_Default($CONFIG); | ||
| 13 | $obj->data_sources = array('value'); | ||
| 14 | $obj->width = $width; | ||
| 15 | $obj->heigth = $heigth; | ||
| 16 | $obj->generate_colors(); | ||
| 17 | $obj->rrd_title = 'CPU frequency scaling'; | ||
| 18 | $obj->rrd_vertical = 'Mhz'; | ||
| 19 | $obj->rrd_format = '%5.1lf%s'; | ||
| 20 | |||
| 21 | collectd_flush($obj->identifiers); | ||
| 22 | $obj->rrd_graph(); | ||
