Code

collectd.git
11 years agoUse plugin_thread_create() rather than pthread_create() in all plugins.
Sebastian Harl [Sun, 14 Oct 2012 15:52:39 +0000 (17:52 +0200)]
Use plugin_thread_create() rather than pthread_create() in all plugins.

This function copies the plugin context from the calling thread to the new
thread. While this might not strictly be necessary in most/many cases, this
will make sure that any code within a plugin uses the same context
information, thus avoiding possible problems in the future.

11 years agopython: Fix memory leaks.
Sven Trenkel [Sun, 14 Oct 2012 15:12:45 +0000 (15:12 +0000)]
python: Fix memory leaks.

11 years agoplugin: Don't switch plugin context in 'write', 'notification' and 'log'.
Sebastian Harl [Sun, 14 Oct 2012 14:53:57 +0000 (16:53 +0200)]
plugin: Don't switch plugin context in 'write', 'notification' and 'log'.

Rather, keep the context (i.e. interval) information of the calling (read)
plugin. This allows the write, notify and log callbacks to access the correct
interval settings appropriate for the current data-set.

11 years agoInitialize plugin context to global interval before loading a plugin.
Sebastian Harl [Sun, 14 Oct 2012 14:42:35 +0000 (16:42 +0200)]
Initialize plugin context to global interval before loading a plugin.

This ensures that the actual interval for each plugin is available through its
context. It is a preparation for removing 'interval_g' (which has limited use
after introducing per-plugin intervals and, thus, its use is rather error-
prone).

11 years agoDon't use 'interval_g' in any plugins.
Sebastian Harl [Sun, 14 Oct 2012 14:37:18 +0000 (16:37 +0200)]
Don't use 'interval_g' in any plugins.

Rather, use plugin_get_interval () in order to honor any plugin specific
interval settings.

11 years agoplugin: Added plugin_get_interval().
Sebastian Harl [Sun, 14 Oct 2012 14:31:01 +0000 (16:31 +0200)]
plugin: Added plugin_get_interval().

This function returns the current value of the plugin's interval. If no
interval has been set in the plugin context, it will fall back to the global
interval or ten seconds as a last resort.

11 years agosrc/utils_format_graphite.[ch]: Add the "store_rates" option.
Florian Forster [Fri, 12 Oct 2012 06:16:17 +0000 (08:16 +0200)]
src/utils_format_graphite.[ch]: Add the "store_rates" option.

This functionality must have been lost in the refactoring that added
Graphite support to the AMQP plugin.

11 years agonetwork.c: workaround for broken OSX compilers issuing false warnings
Chris Lundquist [Thu, 11 Oct 2012 00:04:26 +0000 (17:04 -0700)]
network.c: workaround for broken OSX compilers issuing false warnings

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoMerge branch 'collectd-5.1'
Florian Forster [Thu, 11 Oct 2012 20:04:03 +0000 (22:04 +0200)]
Merge branch 'collectd-5.1'

11 years agoMerge remote-tracking branch 'origin/collectd-5.1' into collectd-5.1
Florian Forster [Thu, 11 Oct 2012 20:03:51 +0000 (22:03 +0200)]
Merge remote-tracking branch 'origin/collectd-5.1' into collectd-5.1

11 years agoMerge branch 'collectd-5.1'
Florian Forster [Thu, 11 Oct 2012 19:58:31 +0000 (21:58 +0200)]
Merge branch 'collectd-5.1'

11 years agosrc/utils_db_query.[ch]: Remove duplicate "const" modifier.
Florian Forster [Thu, 11 Oct 2012 19:52:36 +0000 (21:52 +0200)]
src/utils_db_query.[ch]: Remove duplicate "const" modifier.

11 years agoMerge branch 'collectd-5.0' into collectd-5.1
Florian Forster [Thu, 11 Oct 2012 08:22:53 +0000 (10:22 +0200)]
Merge branch 'collectd-5.0' into collectd-5.1

Conflicts:
src/snmp.c

11 years agoMerge branch 'collectd-4.10' into collectd-5.0
Florian Forster [Thu, 11 Oct 2012 08:07:41 +0000 (10:07 +0200)]
Merge branch 'collectd-4.10' into collectd-5.0

Conflicts:
src/snmp.c

11 years agoMerge branch 'ff/snmp' into collectd-4.10
Florian Forster [Thu, 11 Oct 2012 08:01:44 +0000 (10:01 +0200)]
Merge branch 'ff/snmp' into collectd-4.10

11 years agosrc/ntpd.c: Write NAN if the peer was not reachable
Johan Kiviniemi [Mon, 8 Oct 2012 15:20:12 +0000 (18:20 +0300)]
src/ntpd.c: Write NAN if the peer was not reachable

11 years agosrc/utils_avltree.c: Fix an off-by-one error in c_avl_insert().
Florian Forster [Mon, 8 Oct 2012 14:20:34 +0000 (16:20 +0200)]
src/utils_avltree.c: Fix an off-by-one error in c_avl_insert().

When inserting the first node in the tree, the size is not incremented.
This causes c_avl_size() to return one element too little.

Thanks to Yves Mettier for debugging this!

11 years agoBugfix (mutex unlock instead of lock)
Yves Mettier [Mon, 8 Oct 2012 08:53:09 +0000 (10:53 +0200)]
Bugfix (mutex unlock instead of lock)

11 years agorc/utils_cache.c: Allocate most of the memory required by uc_get_names() at once.
Florian Forster [Sun, 7 Oct 2012 07:42:28 +0000 (09:42 +0200)]
rc/utils_cache.c: Allocate most of the memory required by uc_get_names() at once.

strdup() will still require additional memory, but no more memory movement like
required when doing realloc() a lot.

This fixes Github issue #148.

11 years agocollectd.conf(5): Document the "LoadPlugin / Interval" option.
Florian Forster [Sat, 6 Oct 2012 15:42:10 +0000 (17:42 +0200)]
collectd.conf(5): Document the "LoadPlugin / Interval" option.

11 years agosrc/plugin.c: Document the use of "register_complex_read".
Florian Forster [Sat, 6 Oct 2012 15:38:50 +0000 (17:38 +0200)]
src/plugin.c: Document the use of "register_complex_read".

Also add assertions to make sure plugin_init_ctx() is used correctly.

11 years agontpd plugin: Make some arguments 'const'.
Florian Forster [Fri, 5 Oct 2012 08:27:27 +0000 (10:27 +0200)]
ntpd plugin: Make some arguments 'const'.

11 years agontpd plugin: Refactor the peer name generation.
Florian Forster [Fri, 5 Oct 2012 08:21:17 +0000 (10:21 +0200)]
ntpd plugin: Refactor the peer name generation.

Break it out of the main read-loop and put it into two functions: One for the
reference clocks and one for network hosts. The reference clock code will call
the network host code when the clock name is not available in the internal list
of reference clock names. This eliminates the (thread-unsafe) usage of
inet_ntoa(3).

11 years agoDocument ntpd IncludeUnitID and add to default config
Johan Kiviniemi [Thu, 4 Oct 2012 22:01:44 +0000 (01:01 +0300)]
Document ntpd IncludeUnitID and add to default config

11 years agosrc/ntpd.c: Add IncludeUnitID option for backwards compatibility
Johan Kiviniemi [Thu, 4 Oct 2012 21:38:52 +0000 (00:38 +0300)]
src/ntpd.c: Add IncludeUnitID option for backwards compatibility

11 years agosrc/ntpd.c: Format refclock name and unit ID with %s-%u
Johan Kiviniemi [Thu, 4 Oct 2012 21:24:19 +0000 (00:24 +0300)]
src/ntpd.c: Format refclock name and unit ID with %s-%u

11 years agosrc/ntpd.c: Add unit number to refclock name
Johan Kiviniemi [Thu, 4 Oct 2012 17:56:34 +0000 (20:56 +0300)]
src/ntpd.c: Add unit number to refclock name

There can be multiple instances of the same refclock with different unit
numbers. The unit number needs to be a part of the peer name, otherwise
the code will try to write the measurements from multiple peers to the
same RRD file.

11 years agoMerge branch 'ym/utils_cache_bugfix'
Florian Forster [Thu, 4 Oct 2012 08:16:56 +0000 (10:16 +0200)]
Merge branch 'ym/utils_cache_bugfix'

11 years agosrc/utils_cache.c: Fix comment re defining LISTVAL_INCREASE.
Florian Forster [Thu, 4 Oct 2012 08:15:36 +0000 (10:15 +0200)]
src/utils_cache.c: Fix comment re defining LISTVAL_INCREASE.

Using the preprocessor flags (CPPFLAGS) is a tad more correct I think.

11 years agosnmp plugin: Fix incorrect comparison in csnmp_oid_compare().
Florian Forster [Thu, 4 Oct 2012 05:57:25 +0000 (07:57 +0200)]
snmp plugin: Fix incorrect comparison in csnmp_oid_compare().

11 years agothe increment is defined as a constant (#define) and will not be a
Yves Mettier [Wed, 3 Oct 2012 09:27:46 +0000 (11:27 +0200)]
the increment is defined as a constant (#define) and will not be a
variable. So its names becomes uppercase.

11 years agosnmp plugin: Check the return value of csnmp_oid_suffix().
Florian Forster [Wed, 3 Oct 2012 06:32:20 +0000 (08:32 +0200)]
snmp plugin: Check the return value of csnmp_oid_suffix().

Also fix an issue where the complete OID is compared with only the suffix.

Thanks to Mark Juric to test the changes and point out these problems.

Issue: #131

11 years agoAdd in swap plugin reserved, in and out values for AIX.
Manuel Luis Sanmartín Rozada [Wed, 5 Sep 2012 11:24:03 +0000 (13:24 +0200)]
Add in swap plugin reserved, in and out values for AIX.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoMerge branch 'mlsr/uptime-aix'
Florian Forster [Tue, 2 Oct 2012 20:04:08 +0000 (22:04 +0200)]
Merge branch 'mlsr/uptime-aix'

11 years agoAdd libperfstat in Makefile.am
Manuel Luis Sanmartin Rozada [Sun, 30 Sep 2012 12:47:38 +0000 (14:47 +0200)]
Add libperfstat in Makefile.am

11 years agoAdd AIX support for uptime plugin.
Manuel Luis Sanmartín Rozada [Wed, 5 Sep 2012 12:01:40 +0000 (14:01 +0200)]
Add AIX support for uptime plugin.

11 years agoFix typo in if and return
Manuel Luis Sanmartin Rozada [Sun, 30 Sep 2012 12:06:02 +0000 (14:06 +0200)]
Fix typo in if and return

11 years agoFix link with perfstat
Manuel Luis Sanmartin Rozada [Sat, 29 Sep 2012 20:28:25 +0000 (22:28 +0200)]
Fix link with perfstat

11 years agoAIX suport in contextswitch plugin.
Manuel Luis Sanmartín Rozada [Wed, 5 Sep 2012 11:48:03 +0000 (13:48 +0200)]
AIX suport in contextswitch plugin.

11 years agosequence_number is only used in linux.
Manuel Luis Sanmartin Rozada [Sat, 29 Sep 2012 19:54:32 +0000 (21:54 +0200)]
sequence_number is only used in linux.
Generate a compilation error.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoThe commit 3bda88e8b425f43644e303e6957e38ae59c1bc83 change the shell from sh to bash.
Manuel Luis Sanmartin Rozada [Sat, 29 Sep 2012 19:45:33 +0000 (21:45 +0200)]
The commit 3bda88e8b425f43644e303e6957e38ae59c1bc83 change the shell from sh to bash.
To fix the configure script generation error: remove the echo whith \c used in sh.

Note: bash is not installed in AIX by default.
Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoARG_MAX on Solaris is *very* large, 2 MB. Allocating that much on the
hume-github [Thu, 27 Sep 2012 13:43:09 +0000 (10:43 -0300)]
ARG_MAX on Solaris is *very* large, 2 MB.  Allocating that much on the
stack (local variable) overflows the thread stack and crashes the
process in weird and interesting ways.

"int i" is a useless variable and breaks the build with -Werror.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agosnmp plugin: Fix iterating over tables without an instance configuration.
Florian Forster [Tue, 2 Oct 2012 07:28:32 +0000 (09:28 +0200)]
snmp plugin: Fix iterating over tables without an instance configuration.

Also should fix incorrect handling of instance values; the first one would
be skipped.

11 years agoPerformance improvment : uc_get_names now allocates memory by blocks and not element...
Yves Mettier [Fri, 28 Sep 2012 09:51:22 +0000 (11:51 +0200)]
Performance improvment : uc_get_names now allocates memory by blocks and not element by element.

11 years agoconfigure: Only set the Perl interpreter if the argument is a file.
Florian Forster [Tue, 25 Sep 2012 10:32:50 +0000 (12:32 +0200)]
configure: Only set the Perl interpreter if the argument is a file.

This fixes Github issue #137.

11 years agoFixed bugs that prevented to "make distcheck"
Yves Mettier [Mon, 17 Sep 2012 13:46:24 +0000 (15:46 +0200)]
Fixed bugs that prevented to "make distcheck"

Fixes Github issue #132.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoprocesses plugin: Coding style and whitespace changes.
Florian Forster [Mon, 19 Mar 2012 07:43:49 +0000 (08:43 +0100)]
processes plugin: Coding style and whitespace changes.

11 years agoprocesses plugin: Use stack memory when reading the command line.
Florian Forster [Mon, 19 Mar 2012 07:43:22 +0000 (08:43 +0100)]
processes plugin: Use stack memory when reading the command line.

Also remove the call to the non-threadsafe strtok(3) call and fix the
size passed to sstrncpy().

11 years agoprocesses plugin: Call ps_submit_fork_rate() from read_fork_rate().
Florian Forster [Sun, 18 Mar 2012 20:01:53 +0000 (21:01 +0100)]
processes plugin: Call ps_submit_fork_rate() from read_fork_rate().

This avoids the "return ULONG_MAX" hack to signal a problem.

11 years agoBuffer and memory allocation related bug fixes and changes
Cosmin Ioiart [Wed, 7 Mar 2012 11:33:12 +0000 (12:33 +0100)]
Buffer and memory allocation related bug fixes and changes

Replaced "free" with "sfree" for memory deallocation.
Added memset(...) to initialized newly allocated memory
Removed buffer "termination".

11 years agoAdded support for the Solaris OS processes
Cosmin Ioiart [Tue, 6 Mar 2012 14:58:25 +0000 (15:58 +0100)]
Added support for the Solaris OS processes

  Added support for process information on the Solaris OS. The information comes mainly from
  /proc/PID/status, /proc/PID/psinfo , /proc/PID/usage and kstat
  Added a few "solaris" specific process states as well

11 years agoMerge branch 'collectd-5.1'
Florian Forster [Sun, 23 Sep 2012 10:22:37 +0000 (12:22 +0200)]
Merge branch 'collectd-5.1'

11 years agoMerge branch 'collectd-5.0' into collectd-5.1
Florian Forster [Sun, 23 Sep 2012 10:22:27 +0000 (12:22 +0200)]
Merge branch 'collectd-5.0' into collectd-5.1

11 years agoMerge branch 'collectd-4.10' into collectd-5.0
Florian Forster [Sun, 23 Sep 2012 10:20:49 +0000 (12:20 +0200)]
Merge branch 'collectd-4.10' into collectd-5.0

Conflicts:
src/utils_db_query.c
src/zfs_arc.c

11 years agoFix for Solaris when setting ip-opt multicast-loop (must be a char, not int).
hume-github [Tue, 18 Sep 2012 18:19:39 +0000 (15:19 -0300)]
Fix for Solaris when setting ip-opt multicast-loop (must be a char, not int).
General logging additions for tracking down the problem.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoMultithreading fix: localize unneeded global variable
hume-github [Tue, 18 Sep 2012 18:12:25 +0000 (15:12 -0300)]
Multithreading fix: localize unneeded global variable

11 years agoethstat plugin: Initialize realloc'ated memory.
Florian Forster [Sun, 23 Sep 2012 10:00:43 +0000 (12:00 +0200)]
ethstat plugin: Initialize realloc'ated memory.

The last element in "interfaces" is not guaranteed to be zeroed, resulting in a
segfault when cf_util_get_string() tries to free the "pointer".

Thanks to Mark T. Voelker for reporting and analyzing this bug!
This should fix Github issue #133.

11 years agoethstat plugin: Fix off-by-one error.
Florian Forster [Sun, 23 Sep 2012 09:56:58 +0000 (11:56 +0200)]
ethstat plugin: Fix off-by-one error.

This hopefully fixes Github issue #135.

11 years agosnmp plugin: Improve subtree matching.
Florian Forster [Sun, 23 Sep 2012 09:50:57 +0000 (11:50 +0200)]
snmp plugin: Improve subtree matching.

Some MIBs use subtrees with an unusual OID naming schema. For example,
some network hardware encodes the MAC address in the last six parts of
the OID. Previously, the code only checked the last part of the OID
("sub-id") and assumed this was increasing. This assumption is not true
in such naming schemas and is not required by SNMP. This patch fixes
this behavior by comparing the entire "OID suffix".

This hopefully fixes Github issue #131.

11 years agosnmp plugin: Expand tabs.
Florian Forster [Sun, 23 Sep 2012 09:44:39 +0000 (11:44 +0200)]
snmp plugin: Expand tabs.

11 years agosnmp plugin: Rename a couple of confusing variables.
Florian Forster [Tue, 18 Sep 2012 06:40:00 +0000 (08:40 +0200)]
snmp plugin: Rename a couple of confusing variables.

"head" and "tail" are way better names, I hope.

11 years agosnmp plugin: Improve some comments.
Florian Forster [Tue, 18 Sep 2012 06:29:26 +0000 (08:29 +0200)]
snmp plugin: Improve some comments.

11 years agolibs varnish & varnishcompat are NOT needed. "pkg-config --libs varnishapi" output...
JonathanHuot [Thu, 13 Sep 2012 16:27:57 +0000 (18:27 +0200)]
libs varnish & varnishcompat are NOT needed. "pkg-config --libs varnishapi" output only libvarnishapi as well

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoconfigure: Activate the PF plugin when net/pfvar.h is available.
Florian Forster [Thu, 13 Sep 2012 15:56:13 +0000 (17:56 +0200)]
configure: Activate the PF plugin when net/pfvar.h is available.

Apparently PF has been or is being ported to FreeBSD, so simply checking the OS
name is not the best of ideas.

11 years agopf plugin: Coding style changes.
Florian Forster [Thu, 13 Sep 2012 12:06:23 +0000 (14:06 +0200)]
pf plugin: Coding style changes.

* Move the names array to the top of the module.
* Avoid type issues by passing an uint64_t to pf_submit(). The fields are
  using the BSD specific u_int64_t type.
* Use derive rather than counter.
* Add some more imports that may be required.

11 years agopf plugin: Remove the init() callback.
Florian Forster [Thu, 13 Sep 2012 12:01:40 +0000 (14:01 +0200)]
pf plugin: Remove the init() callback.

Instead check for a running PF in the read() callback.

11 years agotypes.db: Remove unused types.
Florian Forster [Thu, 13 Sep 2012 11:56:18 +0000 (13:56 +0200)]
types.db: Remove unused types.

Also fix a merge bug.

11 years agopf plugin: Rearrange functions to get rid of prototypes.
Florian Forster [Thu, 13 Sep 2012 11:22:32 +0000 (13:22 +0200)]
pf plugin: Rearrange functions to get rid of prototypes.

* Add collectd specific includes.
* Make global variables and functions static.
* Remove main() function and associated code.

11 years agoBuild system: Add the PF plugin.
Florian Forster [Thu, 13 Sep 2012 11:17:41 +0000 (13:17 +0200)]
Build system: Add the PF plugin.

11 years agoMerge branch 'master' into sr/pf
Florian Forster [Thu, 13 Sep 2012 11:11:22 +0000 (13:11 +0200)]
Merge branch 'master' into sr/pf

Conflicts:
src/types.db

11 years agopf plugin: also collect the current states sum
Stefan Rinkes [Thu, 28 Apr 2011 17:43:09 +0000 (19:43 +0200)]
pf plugin: also collect the current states sum

11 years agopf plugin: Change warn() to ERROR().
Stefan Rinkes [Mon, 25 Apr 2011 20:16:08 +0000 (22:16 +0200)]
pf plugin: Change warn() to ERROR().

11 years agobindings/Makefile: perl: Use INSTALL_BASE rather than PREFIX.
Sebastian Harl [Wed, 13 Jun 2012 12:33:05 +0000 (14:33 +0200)]
bindings/Makefile: perl: Use INSTALL_BASE rather than PREFIX.

Some versions of Perl / ExtUtils::MakeMaker will else abort with an error
message explaining INSTALL_BASE and PREFIX may not be used both. However, I
don't know where the other definition comes from.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoconfigure: Don't add -liptc to the global LIBS setting.
Sebastian Harl [Wed, 13 Jun 2012 12:31:00 +0000 (14:31 +0200)]
configure: Don't add -liptc to the global LIBS setting.

AC_SEARCH_LIBS() would do that, so save and restore LIBS when calling that
macro.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoconfigure: Use AC_INCLUDES_DEFAULT when checking any libkvm stuff.
Sebastian Harl [Fri, 18 May 2012 20:31:13 +0000 (22:31 +0200)]
configure: Use AC_INCLUDES_DEFAULT when checking any libkvm stuff.

kvm.h requires sys/types.h to be included. Using AC_INCLUDES_DEFAULT will
hopefully make sure that we're save for a bit ;-)

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agocurl_xml plugin: Mark read-only strings as const.
Florian Forster [Thu, 13 Sep 2012 08:53:19 +0000 (10:53 +0200)]
curl_xml plugin: Mark read-only strings as const.

11 years agofix Host config being ignored
Fabien Wernli [Mon, 28 Nov 2011 09:46:18 +0000 (10:46 +0100)]
fix Host config being ignored

Change-Id: I8a109818d8a821e2f3e0660fbb6ba1843279fcc2
Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoapcups plugin: Retry sending the "status" command.
Florian Forster [Thu, 13 Sep 2012 08:18:14 +0000 (10:18 +0200)]
apcups plugin: Retry sending the "status" command.

If that fails more than twice in the first 10 iterations, gracefully shut
down the socket in all future iterations.

This should fix Github issue #15.

11 years agoapcups plugin: Add function net_shutdown().
Florian Forster [Thu, 13 Sep 2012 08:05:35 +0000 (10:05 +0200)]
apcups plugin: Add function net_shutdown().

11 years agoapcups plugin: Make sure the socket is closed on errors.
Florian Forster [Thu, 13 Sep 2012 08:04:26 +0000 (10:04 +0200)]
apcups plugin: Make sure the socket is closed on errors.

11 years agosrc/utils_db_query.c: Use the right field when checking for size.
Florian Forster [Wed, 12 Sep 2012 20:51:58 +0000 (22:51 +0200)]
src/utils_db_query.c: Use the right field when checking for size.

11 years agoswap plugin: Add the "ReportBytes" option.
Florian Forster [Wed, 12 Sep 2012 16:55:08 +0000 (18:55 +0200)]
swap plugin: Add the "ReportBytes" option.

When enabled, swap I/O is reported in bytes, not pages. Only valid for Linux.

This should fix Github issue #10.

11 years agoRevert "swap plugin: Add the "ReportBytes" option."
Florian Forster [Wed, 12 Sep 2012 19:31:41 +0000 (21:31 +0200)]
Revert "swap plugin: Add the "ReportBytes" option."

This reverts commit 25fd1667c186eb871a4b66f9866d6446e41f1bc2.

11 years agoswap plugin: Add the "ReportBytes" option.
Florian Forster [Wed, 12 Sep 2012 16:55:08 +0000 (18:55 +0200)]
swap plugin: Add the "ReportBytes" option.

When enabled, swap I/O is reported in bytes, not pages. Only valid for Linux.

This should fix Github issue #10.

11 years agoexec plugin: Really remove STDERR from the select() set.
Florian Forster [Wed, 12 Sep 2012 16:25:20 +0000 (18:25 +0200)]
exec plugin: Really remove STDERR from the select() set.

select(2) is actually using a variable called "copy", which we didn't set in
this case.

Fixes Github issue #12. Thanks to Tetsuya Kawaguchi for reporting this problem.

11 years agoconfigure.in: Make sure sa_familiy_t is defined when checking rtnl_dump_filter().
Florian Forster [Tue, 11 Sep 2012 07:54:32 +0000 (09:54 +0200)]
configure.in: Make sure sa_familiy_t is defined when checking rtnl_dump_filter().

11 years agonetlink plugin: Check for the number of arguments to 'rtnl_dump_filter'.
Sebastian Harl [Sat, 19 May 2012 10:31:52 +0000 (12:31 +0200)]
netlink plugin: Check for the number of arguments to 'rtnl_dump_filter'.

In recent versions of iproute2, 'rtnl_dump_filter' expects three rather than
five arguments.

This should fix Github issue #7.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoFixed collectd's unixsock read interrupted by SIGCHLD's.
Gerrie Roos [Tue, 17 Apr 2012 13:22:36 +0000 (15:22 +0200)]
Fixed collectd's unixsock read interrupted by SIGCHLD's.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoFixed various collectd memory leaks.
Gerrie Roos [Fri, 25 May 2012 03:38:47 +0000 (05:38 +0200)]
Fixed various collectd memory leaks.

Once I understood what's going on I tried to keep the changes to a minimum.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoMerge branch 'ff/kstat' into collectd-4.10
Florian Forster [Mon, 10 Sep 2012 19:10:45 +0000 (21:10 +0200)]
Merge branch 'ff/kstat' into collectd-4.10

11 years agoSet license info line to ”GPLv2 or newer”
Adrian Perez [Fri, 7 Sep 2012 13:59:32 +0000 (16:59 +0300)]
Set license info line to ”GPLv2 or newer”

Recently I had a request to change the licensing of this file to
use it in a GPLv3 application. This change would make it easier,
while retaining GPLv2 to make the license still match the one in
collectd.

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoMerge branch 'collectd-5.1'
Florian Forster [Fri, 7 Sep 2012 09:19:52 +0000 (11:19 +0200)]
Merge branch 'collectd-5.1'

11 years agoMerge branch 'collectd-5.0' into collectd-5.1
Florian Forster [Fri, 7 Sep 2012 09:15:24 +0000 (11:15 +0200)]
Merge branch 'collectd-5.0' into collectd-5.1

Conflicts:
src/swap.c

11 years agoMerge branch 'collectd-4.10' into collectd-5.0
Florian Forster [Fri, 7 Sep 2012 09:05:48 +0000 (11:05 +0200)]
Merge branch 'collectd-4.10' into collectd-5.0

11 years agocorrected high-resolution time conversions after code review
m4rienf [Thu, 6 Sep 2012 19:25:22 +0000 (21:25 +0200)]
corrected high-resolution time conversions after code review

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agoUpdated Adrian Perez' 2009 Python network proto classes
m4rienf [Tue, 4 Sep 2012 18:23:43 +0000 (20:23 +0200)]
Updated Adrian Perez' 2009 Python network proto classes

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agosnmp plugin: Fix error message printed by the "Shift" option.
Dan Thomson [Fri, 7 Sep 2012 02:00:11 +0000 (19:00 -0700)]
snmp plugin: Fix error message printed by the "Shift" option.

I noticed a small error in snmp.c in collectd-5.1.0 (might be
elsewhere). The warning message in csnmp_config_add_data_shift says
"Scale config option" instead of "Shift" config option:
[…]

Signed-off-by: Florian Forster <octo@collectd.org>
11 years agodf plugin: when checking / do it just once
Bruno Prémont [Wed, 21 Mar 2012 20:34:00 +0000 (21:34 +0100)]
df plugin: when checking / do it just once

Newer system symlink /etc/mtab to /proc/mounts which makes root
filesystem seem mounted twice, once as type rootfs and once for the
real device.

When / is selected for df plugin, skip the rootfs mount-point as
real root is usually mounted right on top of it.

Not skipping it causes rrdtool to complain about two updates for the
same timestamp, the first entry for rootfs passes but rrdtool complains
when stats for the second occurrence for real filesystem is being
considered.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Florian Forster <octo@collectd.org>
11 years agosnmp plugin: Check for SNMP_ENDOFMIBVIEW.
Florian Forster [Fri, 7 Sep 2012 08:11:42 +0000 (10:11 +0200)]
snmp plugin: Check for SNMP_ENDOFMIBVIEW.

Some implementations of SNMP will send a special "variable" when you're
leaving the requested subtree with type "endOfMibView" aka.
"SNMP_ENDOFMIBVIEW". Examples of such implementations are Citrix
Netscalers and IBM's General Parallel File System (GPFS). Reading past
this special variable will result in weird values being returned.

This adds an appropriate check to csnmp_check_res_left_subtree().

Thanks to "Mark" for reporting this issue and clarifying.

11 years agosrc/common.c: Add missing semicolon.
Florian Forster [Thu, 6 Sep 2012 15:29:59 +0000 (17:29 +0200)]
src/common.c: Add missing semicolon.