src/utils_time.[ch]: Implement work-around for Mac OS X …
… which, apparently, doesn't have clock_gettime(2).
… which, apparently, doesn't have clock_gettime(2).
src/utils_cache.c: Call the "missing" callbacks when a value is not being updated.
src/common.[ch]: Implement "parse_identifier_vl".
src/plugin.[ch]: Implement "missing" callbacks.
This is a first step towards moving the threshold checking code into
a plugin.
This is a first step towards moving the threshold checking code into
a plugin.
src/collectd.conf.in: Add the LPAR plugin.
collectd.conf(5): Add documentation for the LPAR plugin.
Merge branch 'ff/highres'
Conflicts:
src/netapp.c
Conflicts:
src/netapp.c
network plugin: Introduce new types for the "high resolution" time fields.
unixsock plugin: Implement the "DeleteSocket" option.
python: Added support for subsecond interval.
v5upgrade target: Implement "upgrades" for the ZFS ARC plugin.
zfs_arc plugin: Change the order of type instance "fields" for the "cache_result" type.
zfs_arc plugin: Use the more generic "cache_*" types …
… instead of those awful "arc_*" types.
… instead of those awful "arc_*" types.
src/utils_cmd_flush.c: Fix parsing of the "timeout" option.
rrdtool plugin: Make sure "cache_timeout + random_variation" dosn't get negative.
src/{collectd,plugin}.c: Don't cast "-1" to cdtime_t.
Merge branch 'collectd-4.10'
Merge branch 'collectd-4.9' into collectd-4.10
Conflicts:
src/collectd.conf.in
src/python.c
Conflicts:
src/collectd.conf.in
src/python.c
README: Add libperfstat as an optional dependency.
AUTHORS: Add Aurélien Reynaud
README: Add the "LPAR" plugin.
Merge branch 'ar/lpar'
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>
Signed-off-by: Aurelien Reynaud <collectd@wattapower.net>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>
Signed-off-by: Aurelien Reynaud <collectd@wattapower.net>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>
Signed-off-by: Aurelien Reynaud <collectd@wattapower.net>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'sp/amqp'
AUTHORS: Add Sebastien Pahl.
amqp plugin: Document the lock required to hold when calling "camqp_write_locked".
amqp plugin: Rename the "shutdown" function to avoid problems with shutdown(2).
amqp plugin: Fix order of includes.
src/types.db: Add type "current_sessions".
Many plugins and files: Convert "interval_g" and "vl->interval" to cdtime_t.
Merge branch 'master' into ff/subsecond
Move the "cdtime_t" type to "collectd.h".
This will make it possible to turn "interval_g" into a "cdtime_t".
This will make it possible to turn "interval_g" into a "cdtime_t".
src/collectd.h: Do not include <stdbool.h> here.
powerdns plugin: Make calculation of timeout value more precise.
ipvs plugin: Remove explicit reference of "interval_g".
src/common.c: parse_values: Add error handling.
thermal plugin: Remove explicit reference to "interval_g".
src/utils_cache.c: Fix timeout checking.
rrdtool plugin: Fix the "random variation" implementation.
Various plugins: More fixes for the "cdtime_t" change.
java plugin: Fix conversion from / to Java.
libvirt plugin: Don't set the time explicitly.
Various plugins: Some more fixes with the time_t → cdtime_t change.
network plugin: Don't use the "true" and "false" macros from <stdbool.h>.
They cause more trouble with other includes that they are worth.
They cause more trouble with other includes that they are worth.
src/plugin.[ch]: Change the flush callbacks to take a "cdtime_t".
src/utils_time.h: Add macros for converting to "struct timespec" ..
.. and "struct timeval".
.. and "struct timeval".
src/plugin.[ch]: Change the "time" member to "cdtime_t".
src/configfile.[ch]: Add "cf_util_get_cdtime".
Merge branch 'master' into ff/subsecond
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().
vl.time is initialized to zero instead and the current time is filled in
by dispatch_values().
src/utils_time.[ch]: Add module for sub-second time handling.
netapp plugin: Fixed a bug that prevented the configured interval to be passed on to the dispatch function.
lpar plugin: Calculate "pool busy" from "pool idle", not the other way around.
Merge remote branch 'trenkel/collectd-4.10' into collectd-4.10
Fixed epic documentation fail. Python3 and meta-data support was added with 4.10 but is still listed as missing.
Add sys.argv. Not too many programs consider the possibility that it might not exist resulting in unhandled exceptions.
Fixed possible memory leak in case of broken match_value configs.
src/types.db: Remove unused type "pinba_view".
network plugin: Increase default buffer size to 1452.
src/utils_cache.c: Replace a left-over hard-coded default of "2" with "timeout_g".
Merge branch 'kr/ctxt'
contextswitch plugin: Some coding style changes.
contextswitch plugin: Add copyright and author information.
mysql plugin: Remove some inactive (legacy) code.
apache plugin: Remove legacy code.
Configurations without an "<Instance />" block are not supported
anymore. The documentation and default config have been adapted.
Configurations without an "<Instance />" block are not supported
anymore. The documentation and default config have been adapted.
curl_json plugin: Improve error handling.
curl_json plugin: Restore struct when handling error.
src/collectd.h: Do not include <sensors/sensors.h> here.
lpar plugin: Use a global "perfstat_partition_total_t" struct.
lpar plugin: Account "idle" pool time rather than "max".
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>
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>
lpar plugin: Explain donations a bit more.
lpar plugin: Rename the "system" metric (from "sys").
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>
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>
lpar plugin: Introduce a "NS_TO_TICKS" macro.
This makes the code easier to read, IMHO.
This makes the code easier to read, IMHO.
lpar plugin: Move / add comments.
lpar plugin update
Hello,
here is a new patch against ar/lpar with the following features :
- get back to the original implementation with gauges only. A new type
"vcpu" is created (it was "lpar_pcpu" in the original)
- I tried to keep as much as possible of your changes, but some have
been reverted (the init function is back) because it was simpler for me
to port my previous code rather than adapt it to the current form. Feel
free to change them again
- the "consumed" metric might seem superfluous at first sight as it
could be calculated in the frontend in the general case. But I thought
it might come in handy when dealing with dedicated partitions, where
donated and stolen values are no easy concepts. Not everyone wants to
dig into the code and the APIs to find out what they mean and whether
they should be added to or substracted from other values...
As a side note, one of the changes you introduced was better checking
of the return status from perfstat_partition_total() using errno. This
reminded me that under AIX errno is by default unsafe to use in a
multithreaded environment (which collectd is). I posted a fix ("Fix
errno thread-safety under AIX") on Sat, 19 Jun 2010, which if I am not
mistaken has not been merged yet.
Best regards,
Aurélien Reynaud
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Hello,
here is a new patch against ar/lpar with the following features :
- get back to the original implementation with gauges only. A new type
"vcpu" is created (it was "lpar_pcpu" in the original)
- I tried to keep as much as possible of your changes, but some have
been reverted (the init function is back) because it was simpler for me
to port my previous code rather than adapt it to the current form. Feel
free to change them again
- the "consumed" metric might seem superfluous at first sight as it
could be calculated in the frontend in the general case. But I thought
it might come in handy when dealing with dedicated partitions, where
donated and stolen values are no easy concepts. Not everyone wants to
dig into the code and the APIs to find out what they mean and whether
they should be added to or substracted from other values...
As a side note, one of the changes you introduced was better checking
of the return status from perfstat_partition_total() using errno. This
reminded me that under AIX errno is by default unsafe to use in a
multithreaded environment (which collectd is). I posted a fix ("Fix
errno thread-safety under AIX") on Sat, 19 Jun 2010, which if I am not
mistaken has not been merged yet.
Best regards,
Aurélien Reynaud
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
collection3: Add graph for "ps_disk_octets".
notify_email plugin: Check for "session == NULL" and return gracefully.
I don't know how libesmtp handles NULL pointers and I don't want to take
my chances.
I don't know how libesmtp handles NULL pointers and I don't want to take
my chances.
notify_email plugin: Serialize all accesses to libesmtp using a mutex.
collection3: fix multiple hosts selection issue
When selecting multiple hosts in collection3's hosts list, and with some
plugins only (the ones that use a specific resource name such as memory
or tcpconns), the resulting graph list will be limited to one single
graph (instead of one per host).
This patch addresses this issue by modifying the name of the hash key
in the group_files_by_plugin_instance function, making it less prone
to name collisions by prefixing it by the host name.
Comments and enhancements will be welcome.
Signed-off-by: Jerome Oufella <jerome.oufella@savoirfairelinux.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
When selecting multiple hosts in collection3's hosts list, and with some
plugins only (the ones that use a specific resource name such as memory
or tcpconns), the resulting graph list will be limited to one single
graph (instead of one per host).
This patch addresses this issue by modifying the name of the hash key
in the group_files_by_plugin_instance function, making it less prone
to name collisions by prefixing it by the host name.
Comments and enhancements will be welcome.
Signed-off-by: Jerome Oufella <jerome.oufella@savoirfairelinux.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
nginx plugin: Make the cURL callback code easier to understand.
lpar plugin: Fix error handling of the "perfstat_partition_total" function.
According to the documentation the function returns -1 on error. The
code now assumes anything but one (the number of structures filled) as
error.
According to the documentation the function returns -1 on error. The
code now assumes anything but one (the number of structures filled) as
error.
lpar plugin: Document why comsumed ticks may be larger than entitled ticks.
lpar plugin: Refactor reading of "shared partitions".
Especially calculating the ticks unavailable to the partition has been
improved. The "pool statistics" may need some further work.
The code has been written without an AIX machine at hand, so it's
absolutely untested and may not even compile. Sorry.
Especially calculating the ticks unavailable to the partition has been
improved. The "pool statistics" may need some further work.
The code has been written without an AIX machine at hand, so it's
absolutely untested and may not even compile. Sorry.
lpar plugin: Use booleans for the config options.
lpar plugin: new attempt
Hello Florian,
here is a new version of my lpar plugin. I tried to address the
shortcomings of the previous attempt:
- Minimum and maximum proc capacity are gone, being static values
- The plugin now uses the cpu type for every value, so there is no need
anymore for the lpar_cpu type
- This also means there is no need anymore to compute rates in the
plugin, so the code is IMHO much more elegant
- There is a config option "ReportBySerial", as described in my previous
email
- We now use pool_busy_time directly instead of computing it from total
and idle
The patch is against the current 4.10 branch, rather than against
ar/lpar, because it is more of a complete rewrite than just fixes. I
could provide a patch against ar/lpar however if you prefer so.
Regards,
Aurélien Reynaud
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Hello Florian,
here is a new version of my lpar plugin. I tried to address the
shortcomings of the previous attempt:
- Minimum and maximum proc capacity are gone, being static values
- The plugin now uses the cpu type for every value, so there is no need
anymore for the lpar_cpu type
- This also means there is no need anymore to compute rates in the
plugin, so the code is IMHO much more elegant
- There is a config option "ReportBySerial", as described in my previous
- We now use pool_busy_time directly instead of computing it from total
and idle
The patch is against the current 4.10 branch, rather than against
ar/lpar, because it is more of a complete rewrite than just fixes. I
could provide a patch against ar/lpar however if you prefer so.
Regards,
Aurélien Reynaud
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
lpar plugin: Use the "cpu" type for the general CPU statistics.
New plugin - lpar
Hello,
here is a patch against 4.10 adding a new plugin "lpar".
LPAR stands for Logical PARtitions, which is the virtualization solution
for IBM high-end power systems running AIX.
The standard cpu plugin shows cpu usage as a percentage of each cpu
available to the system, but in an LPAR the number of cpus and their
apparent power can vary according to the load of every LPAR sharing the
same hardware and to the policy set by the admin.
This new plugin allows to monitor real (physical) CPU usage of the
virtualized system, as well as some other metrics specific to IBM's
partitioning solution.
Regards,
Aurélien Reynaud
--
Love is like PI - natural, irrational, endless, and very important.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Hello,
here is a patch against 4.10 adding a new plugin "lpar".
LPAR stands for Logical PARtitions, which is the virtualization solution
for IBM high-end power systems running AIX.
The standard cpu plugin shows cpu usage as a percentage of each cpu
available to the system, but in an LPAR the number of cpus and their
apparent power can vary according to the load of every LPAR sharing the
same hardware and to the policy set by the admin.
This new plugin allows to monitor real (physical) CPU usage of the
virtualized system, as well as some other metrics specific to IBM's
partitioning solution.
Regards,
Aurélien Reynaud
--
Love is like PI - natural, irrational, endless, and very important.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
network plugin: Use the complain mechanism to inform the user about ignored signatures.
perl plugin: Remove the deprecated "plugin_flush_{all,one}" functions.
perl plugin: Remove deprecated compatibility code from "Collectd_plugin_dispatch_values".
src/types.db: Remove the "mysql_qcache" and "mysql_threads" types.
Use the "v5upgrade" taret to preserve compatibility.
Use the "v5upgrade" taret to preserve compatibility.
add support for sysctlbyname: vm.stats.sys.v_swtch
src/utils_tail: Remove newline characters at the end of a line.
The tool is supposed to work line-based, so a) the newline character is
implicit and b) imho, does not belong to the string which is then further
processed.
Also, this allows '$' to match the end of a line when applying a regex to the
line, no matter if the REG_NEWLINE flag has been used when compiling the regex
or not.
The tool is supposed to work line-based, so a) the newline character is
implicit and b) imho, does not belong to the string which is then further
processed.
Also, this allows '$' to match the end of a line when applying a regex to the
line, no matter if the REG_NEWLINE flag has been used when compiling the regex
or not.
utils_match: Let '^' and '$' affect lines rather than the full string.
The regcomp() flag REG_NEWLINE is required for that, even though regex(7)
might make people think otherwise.
The regcomp() flag REG_NEWLINE is required for that, even though regex(7)
might make people think otherwise.
src/collectd.conf.in: Move "TimeToLive" before the "Server" and "Listen" statements.
Thanks to Renaud Chaput for pointing this out!
Thanks to Renaud Chaput for pointing this out!
Merge branch 'collectd-4.10'