* collectd: A programming error has been fixed in the notification
code. The bug may result in an assertion failure.
* memcached plugin: Portability fix for Solaris. Thanks to Amit Gupta
- for reposting the bug.
+ for reporting the bug.
2009-06-02, Version 4.6.3
* Build system, various plugins: Many build fixes for FreeBSD,
use strict;
use warnings;
use lib ('../lib');
+use utf8;
use FindBin ('$RealBin');
use Carp (qw(confess cluck));
DataSources value
RRDTitle "Processes on {hostname}"
RRDVerticalLabel "Processes"
- RRDFormat "%5.1lf%s"
+ RRDFormat "%5.1lf"
DSName running Running
DSName sleeping Sleeping
DSName paging Paging
DataSources value
DSName value Temp
RRDTitle "Temperature ({instance})"
- RRDVerticalLabel "°Celsius"
- RRDFormat "%4.1lf°C"
+ RRDVerticalLabel "°Celsius"
+ RRDFormat "%4.1lf°C"
</Type>
<Type users>
DataSources users
RRDVerticalLabel "W"
RRDFormat "%4.1lfW"
</Type>
-# vim: set sw=2 sts=2 et syntax=apache fileencoding=latin-1 :
+# vim: set sw=2 sts=2 et syntax=apache fileencoding=utf-8 :
start
;;
condrestart)
- [ -f /var/lock/subsys/$prog ] && restart || :
+ [ -f /var/lock/subsys/$prog ] && stop && start || :
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
=head2 Plugin C<rrdcached>
-The C<rrdcached> plugin uses the RRDTool accelerator daemon, L<rrdcached(1)>,
+The C<rrdcached> plugin uses the RRDtool accelerator daemon, L<rrdcached(1)>,
to store values to RRD files in an efficient manner. The combination of the
C<rrdcached> B<plugin> and the C<rrdcached> B<daemon> is very similar to the
way the C<rrdtool> plugin works (see below). The added abstraction layer
You can use the settings B<StepSize>, B<HeartBeat>, B<RRARows>, and B<XFF> to
fine-tune your RRD-files. Please read L<rrdcreate(1)> if you encounter problems
-using these settings. If you don't want to dive into the depths of RRDTool, you
+using these settings. If you don't want to dive into the depths of RRDtool, you
can safely ignore these settings.
=over 4
#include "plugin.h"
#include "configfile.h"
#include "utils_ignorelist.h"
+#include "utils_complain.h"
#include <libvirt/libvirt.h>
#include <libvirt/virterror.h>
/* Connection. */
static virConnectPtr conn = 0;
+static char *conn_string = NULL;
+static c_complain_t conn_complain = C_COMPLAIN_INIT_STATIC;
/* Seconds between list refreshes, 0 disables completely. */
static int interval = 60;
il_interface_devices = ignorelist_create (1);
if (strcasecmp (key, "Connection") == 0) {
- if (conn != 0) {
- ERROR ("Connection may only be given once in config file");
- return 1;
- }
- conn = virConnectOpenReadOnly (value);
- if (!conn) {
- VIRT_ERROR (NULL, "connection failed");
+ char *tmp = strdup (value);
+ if (tmp == NULL) {
+ ERROR ("libvirt plugin: Connection strdup failed.");
return 1;
}
+ sfree (conn_string);
+ conn_string = tmp;
return 0;
}
int i;
if (conn == NULL) {
- ERROR ("libvirt plugin: Not connected. Use Connection in "
- "config file to supply connection URI. For more information "
- "see <http://libvirt.org/uri.html>");
- return -1;
+ /* `conn_string == NULL' is acceptable. */
+ conn = virConnectOpenReadOnly (conn_string);
+ if (conn == NULL) {
+ c_complain (LOG_ERR, &conn_complain,
+ "libvirt plugin: Unable to connect: "
+ "virConnectOpenReadOnly failed.");
+ return -1;
+ }
}
+ c_release (LOG_NOTICE, &conn_complain,
+ "libvirt plugin: Connection established.");
time (&t);
/* Need to refresh domain or device lists? */
if ((last_refresh == (time_t) 0) ||
((interval > 0) && ((last_refresh + interval) <= t))) {
- if (refresh_lists () != 0)
+ if (refresh_lists () != 0) {
+ if (conn != NULL)
+ virConnectClose (conn);
+ conn = NULL;
return -1;
+ }
last_refresh = t;
}
return (-ENOENT);
}
- if (e->type != MD_TYPE_SIGNED_INT)
+ if (e->type != MD_TYPE_STRING)
{
ERROR ("meta_data_get_signed_int: Type mismatch for key `%s'", e->key);
pthread_mutex_unlock (&md->lock);
{
DEBUG ("uc_check_timeout: %s is missing but ``uninteresting''",
keys[i]);
+ ce = NULL;
status = c_avl_remove (cache_tree, keys[i],
(void *) &key, (void *) &ce);
if (status != 0)
}
sfree (keys[i]);
sfree (key);
- cache_free (ce);
+ if (ce != NULL)
+ cache_free (ce);
continue;
}