Merge branch 'collectd-4.9' into collectd-4.10
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sat, 27 Nov 2010 10:00:29 +0000 (11:00 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sat, 27 Nov 2010 10:00:29 +0000 (11:00 +0100)
Conflicts:
ChangeLog
src/collectd.conf.pod
version-gen.sh

ChangeLog
contrib/redhat/init.d-collectd
src/collectd.conf.pod
src/netapp.c
src/processes.c
src/utils_rrdcreate.c

index c50ae2a..b447b07 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * 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
index b7c085c..a60acb3 100644 (file)
@@ -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
index 4faba99..bfb7309 100644 (file)
@@ -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<Warning:> You should set this once and then never touch it again. If you do,
+I<you will have to delete all your RRD files> or know some serious RRDtool
+magic! (Assuming you're using the I<RRDtool> or I<RRDCacheD> plugin.)
+
 =item B<Timeout> I<Iterations>
 
 Consider a value list "missing" when no update has been read or received for
index c50b3db..a4e03c6 100644 (file)
@@ -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;
index 8a3df64..30798d4 100644 (file)
@@ -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;
index 4ecec59..66bb27e 100644 (file)
@@ -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);