From: Florian Forster Date: Sat, 27 Nov 2010 10:00:29 +0000 (+0100) Subject: Merge branch 'collectd-4.9' into collectd-4.10 X-Git-Tag: collectd-4.10.2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=66f9d645f883eee0aa408428eefdebdcc6dcfa7e;hp=69395dbecda0e01df70b69a61f72d12a897037d9;p=collectd.git Merge branch 'collectd-4.9' into collectd-4.10 Conflicts: ChangeLog src/collectd.conf.pod version-gen.sh --- diff --git a/ChangeLog b/ChangeLog index c50ae2a9..b447b07c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -75,6 +75,33 @@ * regex match: The "Invert" option has been added. Thanks to Julien Ammous for his patch. +2010-11-27, Version 4.9.4 + * Documentation: Various documentation fixes. + * collectd: If including one configuration file fails, continue with + the rest of the configuration if possible. + * collectd: Fix a bug in the read function scheduling. In rare cases + read functions may not have been called as often as requested. + * collectd: Concurrency issues with errno(3) under AIX have been + fixed: A thread-safe version of errno has to be requested under AIX. + Thanks to Aurélien Reynaud for his patch. + * curl, memcachec, tail plugins: Fix handling of "DERIVE" data + sources. Matching the end of a string has been improved; thanks to + Sebastian Harl for the patch. + * curl_json plugin: Fix a problem when parsing 64bit integers. Reading + JSON data from non-HTTP sources has been fixed. + * netapp plugin: Pass the interval setting to the dispatch function. + Restore compatibility to NetApp Release 7.3. Thanks to Sven Trenkel + for the patch. + * network plugin: Be less verbose about unchecked signatures, in order + to prevent spamming the logs. + * notify_email plugin: Concurrency problems have been fixed. + * python plugin: Set "sys.argv", since many scripts don't expect that + it may not be set. Thanks to Sven Trenkel for the patch. + * rrdtool, rrdcached plugin: Fix a too strict assertion when creating + RRD files. + * value match: A minor memory leak has been fixed. Thanks to Sven + Trenkel for the patch. + 2010-07-09, Version 4.9.3 * Build system: Checking for "strtok_r" under Solaris has been fixed. * Portability: Fixes for Solaris 8 have been applied. Thanks to diff --git a/contrib/redhat/init.d-collectd b/contrib/redhat/init.d-collectd index b7c085cd..a60acb39 100644 --- a/contrib/redhat/init.d-collectd +++ b/contrib/redhat/init.d-collectd @@ -1,7 +1,7 @@ #!/bin/bash # # collectd Startup script for the Collectd statistics gathering daemon -# chkconfig: - 86 15 +# chkconfig: - 99 01 # description: Collectd is a statistics gathering daemon used to collect \ # system information ie. cpu, memory, disk, network # processname: collectd @@ -15,6 +15,7 @@ RETVAL=0 ARGS="" prog="collectdmon" +service="collectd" CONFIG=/etc/collectd.conf COLLECTD=/usr/sbin/collectd COLLECTDMONPID=/var/run/collectdmon.pid @@ -30,7 +31,7 @@ start () { daemon $prog -P $COLLECTDMONPID -c $COLLECTD -- -C "$CONFIG" RETVAL=$? echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$service fi } stop () { @@ -38,7 +39,7 @@ stop () { killproc $prog RETVAL=$? echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$service } # See how we were called. case "$1" in diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 4faba997..bfb73095 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -129,6 +129,10 @@ Configures the interval in which to query the read plugins. Obviously smaller values lead to a higher system load produced by collectd, while higher values lead to more coarse statistics. +B You should set this once and then never touch it again. If you do, +I or know some serious RRDtool +magic! (Assuming you're using the I or I plugin.) + =item B I Consider a value list "missing" when no update has been read or received for diff --git a/src/netapp.c b/src/netapp.c index c50b3dbd..a4e03c6e 100644 --- a/src/netapp.c +++ b/src/netapp.c @@ -1590,6 +1590,9 @@ static int cna_handle_volume_usage_data (const host_config_t *host, /* {{{ */ if (sis == NULL) continue; + if (na_elem_child(sis, "sis-info")) + sis = na_elem_child(sis, "sis-info"); + sis_state = na_child_get_string(sis, "state"); if (sis_state == NULL) continue; diff --git a/src/processes.c b/src/processes.c index 8a3df644..30798d42 100644 --- a/src/processes.c +++ b/src/processes.c @@ -999,13 +999,18 @@ static char *ps_get_cmdline (pid_t pid, char *name, char *buf, size_t buf_len) if ((pid < 1) || (NULL == buf) || (buf_len < 2)) return NULL; - ssnprintf (file, sizeof (file), "/proc/%u/cmdline", pid); + ssnprintf (file, sizeof (file), "/proc/%u/cmdline", + (unsigned int) pid); + errno = 0; fd = open (file, O_RDONLY); if (fd < 0) { char errbuf[4096]; - WARNING ("processes plugin: Failed to open `%s': %s.", file, - sstrerror (errno, errbuf, sizeof (errbuf))); + /* ENOENT means the process exited while we were handling it. + * Don't complain about this, it only fills the logs. */ + if (errno != ENOENT) + WARNING ("processes plugin: Failed to open `%s': %s.", file, + sstrerror (errno, errbuf, sizeof (errbuf))); return NULL; } @@ -1020,7 +1025,7 @@ static char *ps_get_cmdline (pid_t pid, char *name, char *buf, size_t buf_len) status = read (fd, (void *)buf_ptr, len); if (status < 0) { - char errbuf[4096]; + char errbuf[1024]; if ((EAGAIN == errno) || (EINTR == errno)) continue; diff --git a/src/utils_rrdcreate.c b/src/utils_rrdcreate.c index 4ecec59d..66bb27e7 100644 --- a/src/utils_rrdcreate.c +++ b/src/utils_rrdcreate.c @@ -398,10 +398,9 @@ int cu_rrd_create_file (const char *filename, /* {{{ */ memcpy (argv + ds_num, rra_def, rra_num * sizeof (char *)); argv[ds_num + rra_num] = NULL; - assert (vl->time > 10); status = srrd_create (filename, (cfg->stepsize > 0) ? cfg->stepsize : vl->interval, - vl->time - 10, + (vl->time > 10) ? (vl->time - 10) : vl->time, argc, (const char **) argv); free (argv);