From 488b4f3ea230b0bc3cb7fa7e5264691e21067cd0 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Wed, 4 Nov 2009 23:04:30 +0100 Subject: 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. --- plugin/sensors.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugin/sensors.php') diff --git a/plugin/sensors.php b/plugin/sensors.php index b1b15cf..ddcf521 100644 --- a/plugin/sensors.php +++ b/plugin/sensors.php @@ -52,6 +52,8 @@ switch($type) { break; } +collectd_flush(ident_from_args($obj->args)); + $obj->rrd_graph(); ?> -- cgit v1.1