aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/users.php
diff options
context:
space:
mode:
authorPim van den Berg2009-11-04 23:04:30 +0100
committerPim van den Berg2009-11-04 23:04:30 +0100
commit488b4f3ea230b0bc3cb7fa7e5264691e21067cd0 (patch)
tree67944684b708f9e2998eeeb0200e608f1f451a36 /plugin/users.php
parentremove path_format from plugins (diff)
downloadapt-panopticon_cgp-488b4f3ea230b0bc3cb7fa7e5264691e21067cd0.zip
apt-panopticon_cgp-488b4f3ea230b0bc3cb7fa7e5264691e21067cd0.tar.gz
apt-panopticon_cgp-488b4f3ea230b0bc3cb7fa7e5264691e21067cd0.tar.bz2
apt-panopticon_cgp-488b4f3ea230b0bc3cb7fa7e5264691e21067cd0.tar.xz
add unixsock flush support
Via the UnixSock plugin of Collectd it is possible to send commands to the Collectd daemon. One of the commands is the FLUSH command, which you can use to let the daemon write cached data to the rrd files. CGP uses the FLUSH command before generating a graph and before showing the load information on the main page. In this case the information shown via CGP is always up-to-date. Also when you have configured the RRDTool plugin of Collectd with a CacheTimeout setting. This commit includes code based on functions collectd_identifier and collectd_flush from php-collection by Bruno Prémont.
Diffstat (limited to 'plugin/users.php')
-rw-r--r--plugin/users.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/users.php b/plugin/users.php
index 00874a2..1555927 100644
--- a/plugin/users.php
+++ b/plugin/users.php
@@ -4,6 +4,7 @@
4 4
5require_once 'conf/common.inc.php'; 5require_once 'conf/common.inc.php';
6require_once 'type/Default.class.php'; 6require_once 'type/Default.class.php';
7require_once 'inc/collectd.inc.php';
7 8
8## LAYOUT 9## LAYOUT
9# users/users.rrd 10# users/users.rrd
@@ -31,6 +32,8 @@ $obj->rrd_title = "Users on $host";
31$obj->rrd_vertical = 'Users'; 32$obj->rrd_vertical = 'Users';
32$obj->rrd_format = '%.1lf'; 33$obj->rrd_format = '%.1lf';
33 34
35collectd_flush(ident_from_args($obj->args));
36
34$obj->rrd_graph(); 37$obj->rrd_graph();
35 38
36?> 39?>