From: Florian Forster Date: Sat, 27 Nov 2010 10:46:11 +0000 (+0100) Subject: Merge branch 'collectd-4.10' X-Git-Tag: collectd-5.0.0-beta0~12 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=853b3da5d4c6614d7db4093f57b1ca4f57b6c485;hp=5c4d218936559af2f6cb9857af7f5b9c8d83be6d Merge branch 'collectd-4.10' Conflicts: src/utils_rrdcreate.c --- diff --git a/ChangeLog b/ChangeLog index c50ae2a9..322ae162 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,33 @@ +2010-11-27, Version 4.10.2 + * 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. + * collectd: A left-over hard-coded 2 has been replaced by the + configurable timeout value. + * 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 + * swap plugin: A bug which lead to incorrect I/O values has been + fixed. + * value match: A minor memory leak has been fixed. Thanks to Sven + Trenkel for the patch. + 2010-07-09, Version 4.10.1 * Build system: Checking for "strtok_r" under Solaris has been fixed. * Portability: Fixes for Solaris 8 have been applied. Thanks to @@ -75,6 +105,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 f4f3f1c5..c1c9a253 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 5c4b6e73..5d100a69 100644 --- a/src/netapp.c +++ b/src/netapp.c @@ -1602,6 +1602,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/swap.c b/src/swap.c index f5a0ea2d..2025533e 100644 --- a/src/swap.c +++ b/src/swap.c @@ -260,7 +260,7 @@ static int swap_read (void) if (numfields != 2) continue; - if (strcasecmp ("pswpin", fields[0]) != 0) + if (strcasecmp ("pswpin", fields[0]) == 0) strtoderive (fields[1], &swap_in); else if (strcasecmp ("pswpout", fields[0]) == 0) strtoderive (fields[1], &swap_out); diff --git a/src/utils_rrdcreate.c b/src/utils_rrdcreate.c index 7a389f26..ce6443b7 100644 --- a/src/utils_rrdcreate.c +++ b/src/utils_rrdcreate.c @@ -405,19 +405,19 @@ int cu_rrd_create_file (const char *filename, /* {{{ */ memcpy (argv + ds_num, rra_def, rra_num * sizeof (char *)); argv[ds_num + rra_num] = NULL; - if (vl->time == 0) - last_up = time (NULL) - 10; - else - last_up = CDTIME_T_TO_TIME_T (vl->time) - 10; + last_up = CDTIME_T_TO_TIME_T (vl->time); + if (last_up <= 10) + last_up = time (NULL); + last_up -= 10; if (cfg->stepsize > 0) stepsize = cfg->stepsize; else stepsize = (int) CDTIME_T_TO_TIME_T (vl->interval); - assert (vl->time > 10); status = srrd_create (filename, - stepsize, last_up, + (cfg->stepsize > 0) ? cfg->stepsize : vl->interval, + last_up, argc, (const char **) argv); free (argv); diff --git a/version-gen.sh b/version-gen.sh index 6b3751d0..27ceb3b9 100755 --- a/version-gen.sh +++ b/version-gen.sh @@ -1,6 +1,6 @@ #!/bin/sh -DEFAULT_VERSION="4.10.1.git" +DEFAULT_VERSION="4.10.2.git" VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`"