collectd.git
13 years agoconfigure.in: Make the pkg-config name of liblua configurable. ja/lua
Florian Forster [Sat, 4 Dec 2010 08:36:05 +0000 (09:36 +0100)]
configure.in: Make the pkg-config name of liblua configurable.

13 years agolua plugin: Create a new thread for each callback.
Florian Forster [Sun, 28 Nov 2010 15:21:14 +0000 (16:21 +0100)]
lua plugin: Create a new thread for each callback.

This allows callbacks to call one another and multiple read callbacks to
be handled correctly.

13 years agosrc/utils_lua.[ch]: Various small bugfixes.
Florian Forster [Sun, 28 Nov 2010 15:09:33 +0000 (16:09 +0100)]
src/utils_lua.[ch]: Various small bugfixes.

Don't call "lua_pop()" after a "while (lua_next())" loop, for example.

13 years agolua plugin: Use "lua_pcall" to call read callbacks.
Florian Forster [Sun, 28 Nov 2010 14:23:34 +0000 (15:23 +0100)]
lua plugin: Use "lua_pcall" to call read callbacks.

Otherwise an error in the Lua script will abort() the entire daemon.
The returned error message is handled correctly, too.

13 years agolua plugin: Implement write callbacks.
Florian Forster [Sun, 28 Nov 2010 10:31:52 +0000 (11:31 +0100)]
lua plugin: Implement write callbacks.

13 years agolua plugin: Implement "store callback" and "load callback".
Florian Forster [Sun, 28 Nov 2010 10:02:34 +0000 (11:02 +0100)]
lua plugin: Implement "store callback" and "load callback".

This should make it easier to provide other callback functions.

13 years agosrc/utils_lua.[ch]: Implement functions to export C types to Lua.
Florian Forster [Sun, 28 Nov 2010 09:11:02 +0000 (10:11 +0100)]
src/utils_lua.[ch]: Implement functions to export C types to Lua.

13 years agolua plugin: Move the type conversion functions to a separate module.
Florian Forster [Sun, 28 Nov 2010 08:41:19 +0000 (09:41 +0100)]
lua plugin: Move the type conversion functions to a separate module.

13 years agoMerge branch 'master' into ja/lua
Florian Forster [Fri, 26 Nov 2010 21:50:45 +0000 (22:50 +0100)]
Merge branch 'master' into ja/lua

13 years agosrc/utils_time.[ch]: Implement work-around for Mac OS X …
Florian Forster [Fri, 26 Nov 2010 21:46:26 +0000 (22:46 +0100)]
src/utils_time.[ch]: Implement work-around for Mac OS X …

… which, apparently, doesn't have clock_gettime(2).

13 years agolua plugin: Implement conversion of Lua numbers to value_t.
Florian Forster [Thu, 25 Nov 2010 22:55:52 +0000 (23:55 +0100)]
lua plugin: Implement conversion of Lua numbers to value_t.

With this the conversion from Lua to value_list_t should be complete.

13 years agolua plugin: First take at a "dispatch_values" function.
Florian Forster [Thu, 25 Nov 2010 22:05:19 +0000 (23:05 +0100)]
lua plugin: First take at a "dispatch_values" function.

It works except for the actual values. That shouldn't be too hard to add
to the ltoc_value_list() function.

13 years agolua plugin: Be more verbose when loading a script fails.
Florian Forster [Thu, 25 Nov 2010 12:18:30 +0000 (13:18 +0100)]
lua plugin: Be more verbose when loading a script fails.

13 years agolua plugin: Use the "luaL_openlibs" auxiliary function to load all libraries.
Florian Forster [Thu, 25 Nov 2010 12:15:54 +0000 (13:15 +0100)]
lua plugin: Use the "luaL_openlibs" auxiliary function to load all libraries.

14 years agosrc/collectd.conf.in: Add the Lua plugin.
Florian Forster [Thu, 25 Nov 2010 11:48:40 +0000 (12:48 +0100)]
src/collectd.conf.in: Add the Lua plugin.

14 years agoBuild system, lua plugin: Update for Lua 5.1
Florian Forster [Thu, 25 Nov 2010 11:36:33 +0000 (12:36 +0100)]
Build system, lua plugin: Update for Lua 5.1

I realized I used Lua 5.0 which has been superseeded by Lua 5.1 in 2006.

The build system now uses pkg-config to check for Lua 5.1. Minor
adjustments had to be made to the plugin to work with the new version.

14 years agolua plugin: A first and very simple take at read callbacks.
Florian Forster [Wed, 24 Nov 2010 16:50:18 +0000 (17:50 +0100)]
lua plugin: A first and very simple take at read callbacks.

Apparently it's not possible to export a pointer to a Lua
function to C. We therefore use the "registry" to store the
callbacks there. They are fetched in "clua_read()" using

  lua_pushstring (l, function_name);
  lua_gettable (l, LUA_REGISTRYINDEX);

It is now possible to register read callbacks using:

  collectd_register_read (function ()
    -- do some work here
    return 0;
  end);

As a special case, global functions can be registered using
function names, too. In that case they are looked up in the
"globals" table.

14 years agocontrib/collectd.lua: s/dofile/require/
Florian Forster [Wed, 24 Nov 2010 16:44:32 +0000 (17:44 +0100)]
contrib/collectd.lua: s/dofile/require/

14 years agolua plugin: Move the "collectd_log()" function to src/lua.c.
Florian Forster [Wed, 24 Nov 2010 14:11:16 +0000 (15:11 +0100)]
lua plugin: Move the "collectd_log()" function to src/lua.c.

14 years agolua plugin: Refactor loading of scripts.
Florian Forster [Wed, 24 Nov 2010 12:36:34 +0000 (13:36 +0100)]
lua plugin: Refactor loading of scripts.

14 years agolua plugin: Fix includes.
Florian Forster [Wed, 24 Nov 2010 10:44:30 +0000 (11:44 +0100)]
lua plugin: Fix includes.

"collectd.h" has to be the first file to be included.

14 years agoBuild system: Improve checking for liblua.
Florian Forster [Wed, 24 Nov 2010 10:42:00 +0000 (11:42 +0100)]
Build system: Improve checking for liblua.

14 years agolua plugin: first version
Julien Ammous [Sat, 13 Nov 2010 20:37:58 +0000 (21:37 +0100)]
lua plugin: first version

14 years agosrc/utils_cache.c: Call the "missing" callbacks when a value is not being updated.
Florian Forster [Tue, 23 Nov 2010 12:02:21 +0000 (13:02 +0100)]
src/utils_cache.c: Call the "missing" callbacks when a value is not being updated.

14 years agosrc/common.[ch]: Implement "parse_identifier_vl".
Florian Forster [Tue, 23 Nov 2010 11:57:25 +0000 (12:57 +0100)]
src/common.[ch]: Implement "parse_identifier_vl".

14 years agosrc/plugin.[ch]: Implement "missing" callbacks.
Florian Forster [Tue, 23 Nov 2010 11:56:11 +0000 (12:56 +0100)]
src/plugin.[ch]: Implement "missing" callbacks.

This is a first step towards moving the threshold checking code into
a plugin.

14 years agosrc/collectd.conf.in: Add the LPAR plugin.
Florian Forster [Thu, 18 Nov 2010 08:48:17 +0000 (09:48 +0100)]
src/collectd.conf.in: Add the LPAR plugin.

14 years agocollectd.conf(5): Add documentation for the LPAR plugin.
Florian Forster [Thu, 18 Nov 2010 08:45:22 +0000 (09:45 +0100)]
collectd.conf(5): Add documentation for the LPAR plugin.

14 years agoMerge branch 'ff/highres'
Florian Forster [Wed, 17 Nov 2010 14:18:03 +0000 (15:18 +0100)]
Merge branch 'ff/highres'

Conflicts:
src/netapp.c

14 years agonetwork plugin: Introduce new types for the "high resolution" time fields.
Florian Forster [Tue, 16 Nov 2010 08:20:04 +0000 (09:20 +0100)]
network plugin: Introduce new types for the "high resolution" time fields.

14 years agounixsock plugin: Implement the "DeleteSocket" option.
Florian Forster [Thu, 11 Nov 2010 15:56:32 +0000 (16:56 +0100)]
unixsock plugin: Implement the "DeleteSocket" option.

14 years agopython: Added support for subsecond interval.
Sven Trenkel [Thu, 11 Nov 2010 14:19:15 +0000 (15:19 +0100)]
python: Added support for subsecond interval.

14 years agov5upgrade target: Implement "upgrades" for the ZFS ARC plugin.
Florian Forster [Thu, 11 Nov 2010 12:33:38 +0000 (13:33 +0100)]
v5upgrade target: Implement "upgrades" for the ZFS ARC plugin.

14 years agozfs_arc plugin: Change the order of type instance "fields" for the "cache_result...
Florian Forster [Thu, 11 Nov 2010 11:35:36 +0000 (12:35 +0100)]
zfs_arc plugin: Change the order of type instance "fields" for the "cache_result" type.

14 years agozfs_arc plugin: Use the more generic "cache_*" types …
Florian Forster [Thu, 11 Nov 2010 10:30:37 +0000 (11:30 +0100)]
zfs_arc plugin: Use the more generic "cache_*" types …

… instead of those awful "arc_*" types.

14 years agosrc/utils_cmd_flush.c: Fix parsing of the "timeout" option.
Florian Forster [Sat, 6 Nov 2010 14:04:31 +0000 (15:04 +0100)]
src/utils_cmd_flush.c: Fix parsing of the "timeout" option.

14 years agorrdtool plugin: Make sure "cache_timeout + random_variation" dosn't get negative.
Florian Forster [Sat, 6 Nov 2010 13:26:38 +0000 (14:26 +0100)]
rrdtool plugin: Make sure "cache_timeout + random_variation" dosn't get negative.

14 years agosrc/{collectd,plugin}.c: Don't cast "-1" to cdtime_t.
Florian Forster [Sat, 6 Nov 2010 13:26:16 +0000 (14:26 +0100)]
src/{collectd,plugin}.c: Don't cast "-1" to cdtime_t.

14 years agoMerge branch 'collectd-4.10'
Florian Forster [Sat, 6 Nov 2010 11:11:23 +0000 (12:11 +0100)]
Merge branch 'collectd-4.10'

14 years agoMerge branch 'collectd-4.9' into collectd-4.10
Florian Forster [Sat, 6 Nov 2010 11:08:20 +0000 (12:08 +0100)]
Merge branch 'collectd-4.9' into collectd-4.10

Conflicts:
src/collectd.conf.in
src/python.c

14 years agoREADME: Add libperfstat as an optional dependency.
Florian Forster [Sat, 6 Nov 2010 08:58:57 +0000 (09:58 +0100)]
README: Add libperfstat as an optional dependency.

14 years agoAUTHORS: Add Aurélien Reynaud
Florian Forster [Sat, 6 Nov 2010 08:58:25 +0000 (09:58 +0100)]
AUTHORS: Add Aurélien Reynaud

14 years agoREADME: Add the "LPAR" plugin.
Florian Forster [Sat, 6 Nov 2010 08:55:29 +0000 (09:55 +0100)]
README: Add the "LPAR" plugin.

14 years agoMerge branch 'ar/lpar'
Florian Forster [Sat, 6 Nov 2010 08:40:05 +0000 (09:40 +0100)]
Merge branch 'ar/lpar'

14 years agolpar plugin: rename NS_TO_TICKS() macro to CLOCKTICKS_TO_TICKS()
Aurelien Reynaud [Thu, 14 Oct 2010 20:09:29 +0000 (22:09 +0200)]
lpar plugin: rename NS_TO_TICKS() macro to CLOCKTICKS_TO_TICKS()

Signed-off-by: Aurelien Reynaud <collectd@wattapower.net>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
14 years agolpar plugin: update commen t regarding poll_idle vs pool_busy
Aurelien Reynaud [Thu, 14 Oct 2010 20:09:28 +0000 (22:09 +0200)]
lpar plugin: update commen t regarding poll_idle vs pool_busy

Signed-off-by: Aurelien Reynaud <collectd@wattapower.net>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
14 years agolpar plugin: check for donation support in libperfstat
Aurelien Reynaud [Thu, 14 Oct 2010 20:09:27 +0000 (22:09 +0200)]
lpar plugin: check for donation support in libperfstat

Signed-off-by: Aurelien Reynaud <collectd@wattapower.net>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
14 years agoMerge branch 'sp/amqp'
Florian Forster [Sat, 6 Nov 2010 08:04:39 +0000 (09:04 +0100)]
Merge branch 'sp/amqp'

14 years agoAUTHORS: Add Sebastien Pahl.
Florian Forster [Sat, 6 Nov 2010 08:04:25 +0000 (09:04 +0100)]
AUTHORS: Add Sebastien Pahl.

14 years agoamqp plugin: Document the lock required to hold when calling "camqp_write_locked".
Florian Forster [Sat, 6 Nov 2010 08:00:00 +0000 (09:00 +0100)]
amqp plugin: Document the lock required to hold when calling "camqp_write_locked".

14 years agoamqp plugin: Rename the "shutdown" function to avoid problems with shutdown(2).
Florian Forster [Sat, 6 Nov 2010 07:53:02 +0000 (08:53 +0100)]
amqp plugin: Rename the "shutdown" function to avoid problems with shutdown(2).

14 years agoamqp plugin: Fix order of includes.
Florian Forster [Sat, 6 Nov 2010 07:43:51 +0000 (08:43 +0100)]
amqp plugin: Fix order of includes.

14 years agosrc/types.db: Add type "current_sessions".
Florian Forster [Sat, 6 Nov 2010 07:42:48 +0000 (08:42 +0100)]
src/types.db: Add type "current_sessions".

14 years agoMany plugins and files: Convert "interval_g" and "vl->interval" to cdtime_t.
Florian Forster [Wed, 3 Nov 2010 12:49:58 +0000 (13:49 +0100)]
Many plugins and files: Convert "interval_g" and "vl->interval" to cdtime_t.

14 years agoMerge branch 'master' into ff/subsecond
Florian Forster [Sun, 31 Oct 2010 16:15:06 +0000 (17:15 +0100)]
Merge branch 'master' into ff/subsecond

14 years agoMove the "cdtime_t" type to "collectd.h".
Florian Forster [Sun, 31 Oct 2010 16:10:43 +0000 (17:10 +0100)]
Move the "cdtime_t" type to "collectd.h".

This will make it possible to turn "interval_g" into a "cdtime_t".

14 years agosrc/collectd.h: Do not include <stdbool.h> here.
Florian Forster [Sun, 31 Oct 2010 16:07:40 +0000 (17:07 +0100)]
src/collectd.h: Do not include <stdbool.h> here.

14 years agopowerdns plugin: Make calculation of timeout value more precise.
Florian Forster [Sun, 31 Oct 2010 14:55:06 +0000 (15:55 +0100)]
powerdns plugin: Make calculation of timeout value more precise.

14 years agoipvs plugin: Remove explicit reference of "interval_g".
Florian Forster [Sun, 31 Oct 2010 14:51:51 +0000 (15:51 +0100)]
ipvs plugin: Remove explicit reference of "interval_g".

14 years agosrc/common.c: parse_values: Add error handling.
Florian Forster [Sun, 31 Oct 2010 14:44:18 +0000 (15:44 +0100)]
src/common.c: parse_values: Add error handling.

14 years agothermal plugin: Remove explicit reference to "interval_g".
Florian Forster [Sun, 31 Oct 2010 14:35:50 +0000 (15:35 +0100)]
thermal plugin: Remove explicit reference to "interval_g".

14 years agosrc/utils_cache.c: Fix timeout checking.
Florian Forster [Sun, 31 Oct 2010 13:41:43 +0000 (14:41 +0100)]
src/utils_cache.c: Fix timeout checking.

14 years agorrdtool plugin: Fix the "random variation" implementation.
Florian Forster [Sun, 31 Oct 2010 13:36:11 +0000 (14:36 +0100)]
rrdtool plugin: Fix the "random variation" implementation.

14 years agoVarious plugins: More fixes for the "cdtime_t" change.
Florian Forster [Sun, 31 Oct 2010 13:11:59 +0000 (14:11 +0100)]
Various plugins: More fixes for the "cdtime_t" change.

14 years agojava plugin: Fix conversion from / to Java.
Florian Forster [Sun, 31 Oct 2010 12:48:05 +0000 (13:48 +0100)]
java plugin: Fix conversion from / to Java.

14 years agolibvirt plugin: Don't set the time explicitly.
Florian Forster [Sun, 31 Oct 2010 12:18:11 +0000 (13:18 +0100)]
libvirt plugin: Don't set the time explicitly.

14 years agoVarious plugins: Some more fixes with the time_t → cdtime_t change.
Florian Forster [Sun, 31 Oct 2010 12:09:51 +0000 (13:09 +0100)]
Various plugins: Some more fixes with the time_t → cdtime_t change.

14 years agonetwork plugin: Don't use the "true" and "false" macros from <stdbool.h>.
Florian Forster [Sun, 31 Oct 2010 11:52:31 +0000 (12:52 +0100)]
network plugin: Don't use the "true" and "false" macros from <stdbool.h>.

They cause more trouble with other includes that they are worth.

14 years agosrc/plugin.[ch]: Change the flush callbacks to take a "cdtime_t".
Florian Forster [Sun, 31 Oct 2010 11:51:43 +0000 (12:51 +0100)]
src/plugin.[ch]: Change the flush callbacks to take a "cdtime_t".

14 years agosrc/utils_time.h: Add macros for converting to "struct timespec" ..
Florian Forster [Sun, 31 Oct 2010 11:51:02 +0000 (12:51 +0100)]
src/utils_time.h: Add macros for converting to "struct timespec" ..

.. and "struct timeval".

14 years agosrc/plugin.[ch]: Change the "time" member to "cdtime_t".
Florian Forster [Sun, 31 Oct 2010 11:50:35 +0000 (12:50 +0100)]
src/plugin.[ch]: Change the "time" member to "cdtime_t".

14 years agosrc/configfile.[ch]: Add "cf_util_get_cdtime".
Florian Forster [Sun, 31 Oct 2010 11:39:10 +0000 (12:39 +0100)]
src/configfile.[ch]: Add "cf_util_get_cdtime".

14 years agoMerge branch 'master' into ff/subsecond
Florian Forster [Sat, 30 Oct 2010 12:04:12 +0000 (14:04 +0200)]
Merge branch 'master' into ff/subsecond

14 years agoVarious plugins: Don't call "time(2)" in the plugins to set vl.time.
Florian Forster [Sat, 30 Oct 2010 12:03:02 +0000 (14:03 +0200)]
Various plugins: Don't call "time(2)" in the plugins to set vl.time.

vl.time is initialized to zero instead and the current time is filled in
by dispatch_values().

14 years agosrc/utils_time.[ch]: Add module for sub-second time handling.
Florian Forster [Sat, 30 Oct 2010 11:56:52 +0000 (13:56 +0200)]
src/utils_time.[ch]: Add module for sub-second time handling.

14 years agonetapp plugin: Fixed a bug that prevented the configured interval to be passed on...
Sven Trenkel [Mon, 11 Oct 2010 11:35:39 +0000 (13:35 +0200)]
netapp plugin: Fixed a bug that prevented the configured interval to be passed on to the dispatch function.

14 years agolpar plugin: Calculate "pool busy" from "pool idle", not the other way around.
Florian Forster [Wed, 6 Oct 2010 12:32:56 +0000 (14:32 +0200)]
lpar plugin: Calculate "pool busy" from "pool idle", not the other way around.

14 years agoMerge remote branch 'trenkel/collectd-4.10' into collectd-4.10
Florian Forster [Wed, 6 Oct 2010 08:11:10 +0000 (10:11 +0200)]
Merge remote branch 'trenkel/collectd-4.10' into collectd-4.10

14 years agoFixed epic documentation fail. Python3 and meta-data support was added with 4.10...
Sven Trenkel [Mon, 4 Oct 2010 23:26:22 +0000 (01:26 +0200)]
Fixed epic documentation fail. Python3 and meta-data support was added with 4.10 but is still listed as missing.

14 years agoAdd sys.argv. Not too many programs consider the possibility that it might not exist...
Sven Trenkel [Fri, 1 Oct 2010 00:41:38 +0000 (02:41 +0200)]
Add sys.argv. Not too many programs consider the possibility that it might not exist resulting in unhandled exceptions.

14 years agoFixed possible memory leak in case of broken match_value configs.
Sven Trenkel [Thu, 30 Sep 2010 10:59:21 +0000 (12:59 +0200)]
Fixed possible memory leak in case of broken match_value configs.

14 years agosrc/types.db: Remove unused type "pinba_view".
Florian Forster [Thu, 30 Sep 2010 07:23:22 +0000 (09:23 +0200)]
src/types.db: Remove unused type "pinba_view".

14 years agonetwork plugin: Increase default buffer size to 1452.
Florian Forster [Thu, 30 Sep 2010 06:35:33 +0000 (08:35 +0200)]
network plugin: Increase default buffer size to 1452.

14 years agosrc/utils_cache.c: Replace a left-over hard-coded default of "2" with "timeout_g".
Florian Forster [Wed, 29 Sep 2010 15:56:58 +0000 (17:56 +0200)]
src/utils_cache.c: Replace a left-over hard-coded default of "2" with "timeout_g".

14 years agoMerge branch 'kr/ctxt'
Florian Forster [Wed, 29 Sep 2010 15:06:00 +0000 (17:06 +0200)]
Merge branch 'kr/ctxt'

14 years agocontextswitch plugin: Some coding style changes.
Florian Forster [Wed, 29 Sep 2010 15:04:53 +0000 (17:04 +0200)]
contextswitch plugin: Some coding style changes.

14 years agocontextswitch plugin: Add copyright and author information.
Florian Forster [Wed, 29 Sep 2010 15:04:20 +0000 (17:04 +0200)]
contextswitch plugin: Add copyright and author information.

14 years agomysql plugin: Remove some inactive (legacy) code.
Florian Forster [Mon, 27 Sep 2010 12:05:52 +0000 (14:05 +0200)]
mysql plugin: Remove some inactive (legacy) code.

14 years agoapache plugin: Remove legacy code.
Florian Forster [Mon, 27 Sep 2010 09:45:01 +0000 (11:45 +0200)]
apache plugin: Remove legacy code.

Configurations without an "<Instance />" block are not supported
anymore. The documentation and default config have been adapted.

14 years agocurl_json plugin: Improve error handling.
Florian Forster [Fri, 24 Sep 2010 16:51:14 +0000 (18:51 +0200)]
curl_json plugin: Improve error handling.

14 years agocurl_json plugin: Restore struct when handling error.
Florian Forster [Fri, 24 Sep 2010 09:52:52 +0000 (11:52 +0200)]
curl_json plugin: Restore struct when handling error.

14 years agosrc/collectd.h: Do not include <sensors/sensors.h> here.
Florian Forster [Wed, 15 Sep 2010 15:21:40 +0000 (17:21 +0200)]
src/collectd.h: Do not include <sensors/sensors.h> here.

14 years agolpar plugin: Use a global "perfstat_partition_total_t" struct.
Florian Forster [Sun, 12 Sep 2010 06:21:08 +0000 (08:21 +0200)]
lpar plugin: Use a global "perfstat_partition_total_t" struct.

14 years agolpar plugin: Account "idle" pool time rather than "max".
Florian Forster [Sun, 12 Sep 2010 06:07:38 +0000 (08:07 +0200)]
lpar plugin: Account "idle" pool time rather than "max".

14 years agoPATCH apache.c: support IBM HTTP Server.
Manuel Luis Sanmartín Rozada [Wed, 8 Sep 2010 09:01:23 +0000 (11:01 +0200)]
PATCH apache.c: support IBM HTTP Server.

IBM HTTP Server is a version of apache 2 that comes with Websphere.
IBM change the server name header to:

Server: IBM_HTTP_Server

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
14 years agolpar plugin: Explain donations a bit more.
Florian Forster [Sat, 11 Sep 2010 09:24:14 +0000 (11:24 +0200)]
lpar plugin: Explain donations a bit more.

14 years agolpar plugin: Rename the "system" metric (from "sys").
Florian Forster [Sat, 11 Sep 2010 09:18:47 +0000 (11:18 +0200)]
lpar plugin: Rename the "system" metric (from "sys").

14 years agoFix errno thread-safety under AIX
Aurelien Reynaud [Sat, 19 Jun 2010 18:03:52 +0000 (20:03 +0200)]
Fix errno thread-safety under AIX

Unlike Linux or Solaris, errno under AIX is not thread-safe by
default.

This patch sets _THREAD_SAFE_ERRNO when AIX is detected in order to
force the thread-safe implementation of errno. Without this, calls
like stat() in the rrdtool plugin fail with errno incorrectly set,
leading to the inability to create previously absent rrd files.

Maybe _THREAD_SAFE should be set instead, to prevent other possible
threads-related problems, but this is enough to scratch my current
itch...

Here is the relevant part of /usr/include/errno.h on AIX:

 #if defined(_THREAD_SAFE) || defined(_THREAD_SAFE_ERRNO)
 /*
  * Per thread errno is provided by the threads provider. Both the extern
  * int
  * and the per thread value must be maintained by the threads library.
  */
 extern  int     *_Errno( void );
 #define errno   (*_Errno())

 #else

 extern int errno;

 #endif  /* _THREAD_SAFE || _THREAD_SAFE_ERRNO */

Signed-off-by: Aurelien Reynaud <collectd@wattapower.net>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
14 years agolpar plugin: Introduce a "NS_TO_TICKS" macro.
Florian Forster [Sat, 11 Sep 2010 09:04:44 +0000 (11:04 +0200)]
lpar plugin: Introduce a "NS_TO_TICKS" macro.

This makes the code easier to read, IMHO.

14 years agolpar plugin: Move / add comments.
Florian Forster [Sat, 11 Sep 2010 09:04:04 +0000 (11:04 +0200)]
lpar plugin: Move / add comments.