uc_get_iterator: use ansi function declaration
In file included from common.c:37:0:
utils_cache.h:76:1: warning: function declaration isn’t a prototype
[-Wstrict-prototypes]
uc_iter_t *uc_get_iterator ();
^
In file included from common.c:37:0:
utils_cache.h:76:1: warning: function declaration isn’t a prototype
[-Wstrict-prototypes]
uc_iter_t *uc_get_iterator ();
^
Merge pull request #1750 from tokkee/sh/cli
daemon: Let all command line options override global options from the config.
daemon: Let all command line options override global options from the config.
configfile: Log errors when trying to access unknown global options.
daemon: Let all command line options override global options from the config.
This replaces 09fb81e130ad70bf0547cec3d3c349ce8cb092cf which provided a
specific solution for the `PIDFile' option. The new solution is generic and
more nicely abstracted without the need for global variables across multiple
modules.
Fixes #366
This replaces 09fb81e130ad70bf0547cec3d3c349ce8cb092cf which provided a
specific solution for the `PIDFile' option. The new solution is generic and
more nicely abstracted without the need for global variables across multiple
modules.
Fixes #366
Merge pull request #1747 from rubenk/write_graphite_check_fd
Write graphite check fd
Write graphite check fd
wg_send_buffer: return error if fd < 0
CID 116310
CID 116310
write_graphite: remove dead assignment
status is immediately overwritten in the next line.
status is immediately overwritten in the next line.
Merge pull request #1746 from rubenk/swrite-check-for-open-fd
swrite: return error if fd is negative
swrite: return error if fd is negative
swrite: return error if fd is negative
Merge pull request #1743 from rubenk/apcups-coverity
apcups: ignore result of swrite in net_shutdown
apcups: ignore result of swrite in net_shutdown
apcups: ignore result of swrite in net_shutdown
CID 37945
CID 37945
Add test logs to .gitignore
automake: disable gzipped tarballs
We only use bz2.
Fixes make distcheck on FreeBSD-11-CURRENT
test -n "" || find "collectd-5.5.1.1086.g41e7c34" -type d ! -perm -755 -exec chmod u+rwx,go+rx {} \; -o ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o ! -type d ! -perm -400 -exec chmod a+r {} \; -o ! -type d ! -perm -444 -exec /bin/sh /home/ruben/src/collectd/libltdl/config/install-sh -c -m a+r {} {} \; || chmod -R a+r "collectd-5.5.1.1086.g41e7c34"
tardir=collectd-5.5.1.1086.g41e7c34 && tar --format=posix -chf - "$tardir" | BZIP2=${BZIP2--9} bzip2 -c >collectd-5.5.1.1086.g41e7c34.tar.bz2
tardir=collectd-5.5.1.1086.g41e7c34 && tar --format=posix -chf - "$tardir" | GZIP=--best gzip -c >collectd-5.5.1.1086.g41e7c34.tar.gz
if test -d "collectd-5.5.1.1086.g41e7c34"; then find "collectd-5.5.1.1086.g41e7c34" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "collectd-5.5.1.1086.g41e7c34" || { sleep 5 && rm -rf "collectd-5.5.1.1086.g41e7c34"; }; else :; fi
case 'collectd-5.5.1.1086.g41e7c34.tar.gz collectd-5.5.1.1086.g41e7c34.tar.bz2' in *.tar.gz*) GZIP=--best gzip -dc collectd-5.5.1.1086.g41e7c34.tar.gz | tar -xf - ;; *.tar.bz2*) bzip2 -dc collectd-5.5.1.1086.g41e7c34.tar.bz2 | tar -xf - ;; *.tar.lz*) lzip -dc collectd-5.5.1.1086.g41e7c34.tar.lz | tar -xf - ;; *.tar.xz*) xz -dc collectd-5.5.1.1086.g41e7c34.tar.xz | tar -xf - ;; *.tar.Z*) uncompress -c collectd-5.5.1.1086.g41e7c34.tar.Z | tar -xf - ;; *.shar.gz*) GZIP=--best gzip -dc collectd-5.5.1.1086.g41e7c34.shar.gz | unshar ;; *.zip*) unzip collectd-5.5.1.1086.g41e7c34.zip ;; esac
tar: Parse error: SCHILY.acl.default
tar: Parse error: SCHILY.acl.default
tar: Error exit delayed from previous errors.
*** Error code 1
Stop.
make: stopped in /usr/home/ruben/src/collectd
We only use bz2.
Fixes make distcheck on FreeBSD-11-CURRENT
test -n "" || find "collectd-5.5.1.1086.g41e7c34" -type d ! -perm -755 -exec chmod u+rwx,go+rx {} \; -o ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o ! -type d ! -perm -400 -exec chmod a+r {} \; -o ! -type d ! -perm -444 -exec /bin/sh /home/ruben/src/collectd/libltdl/config/install-sh -c -m a+r {} {} \; || chmod -R a+r "collectd-5.5.1.1086.g41e7c34"
tardir=collectd-5.5.1.1086.g41e7c34 && tar --format=posix -chf - "$tardir" | BZIP2=${BZIP2--9} bzip2 -c >collectd-5.5.1.1086.g41e7c34.tar.bz2
tardir=collectd-5.5.1.1086.g41e7c34 && tar --format=posix -chf - "$tardir" | GZIP=--best gzip -c >collectd-5.5.1.1086.g41e7c34.tar.gz
if test -d "collectd-5.5.1.1086.g41e7c34"; then find "collectd-5.5.1.1086.g41e7c34" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "collectd-5.5.1.1086.g41e7c34" || { sleep 5 && rm -rf "collectd-5.5.1.1086.g41e7c34"; }; else :; fi
case 'collectd-5.5.1.1086.g41e7c34.tar.gz collectd-5.5.1.1086.g41e7c34.tar.bz2' in *.tar.gz*) GZIP=--best gzip -dc collectd-5.5.1.1086.g41e7c34.tar.gz | tar -xf - ;; *.tar.bz2*) bzip2 -dc collectd-5.5.1.1086.g41e7c34.tar.bz2 | tar -xf - ;; *.tar.lz*) lzip -dc collectd-5.5.1.1086.g41e7c34.tar.lz | tar -xf - ;; *.tar.xz*) xz -dc collectd-5.5.1.1086.g41e7c34.tar.xz | tar -xf - ;; *.tar.Z*) uncompress -c collectd-5.5.1.1086.g41e7c34.tar.Z | tar -xf - ;; *.shar.gz*) GZIP=--best gzip -dc collectd-5.5.1.1086.g41e7c34.shar.gz | unshar ;; *.zip*) unzip collectd-5.5.1.1086.g41e7c34.zip ;; esac
tar: Parse error: SCHILY.acl.default
tar: Parse error: SCHILY.acl.default
tar: Error exit delayed from previous errors.
*** Error code 1
Stop.
make: stopped in /usr/home/ruben/src/collectd
src/Makefile: Add valgrind.FreeBSD.suppress to the dist tarball.
Merge pull request #1742 from tokkee/sh/suppress
Valgrind: Suppress a bogus invalid read on FreeBSD.
Valgrind: Suppress a bogus invalid read on FreeBSD.
Merge pull request #1741 from rubenk/fix-leak-in-disk-plugin
Plug a memory leak in disk plugin
Plug a memory leak in disk plugin
Valgrind: Suppress a bogus invalid read on FreeBSD.
Valgrind reports an invalid read in common.c:parse_value. The error is
supposed to happen in strlen() on a just previously strdup()ed string.
Possibly, this is some sort of alignment issue. The read size is reported to
be 4 on a buffer of size 3.
https://bugzilla.redhat.com/show_bug.cgi?id=678518 may also be related.
Valgrind reports an invalid read in common.c:parse_value. The error is
supposed to happen in strlen() on a just previously strdup()ed string.
Possibly, this is some sort of alignment issue. The read size is reported to
be 4 on a buffer of size 3.
https://bugzilla.redhat.com/show_bug.cgi?id=678518 may also be related.
Makefile: Add testwrapper.sh to dist tarballs.
Merge pull request #1740 from rubenk/correct-am_cflags
Append -Werror to the right flags
Append -Werror to the right flags
chrony plugin: constify 2 function arguments
Fixes a couple of dozen of these warnings:
chrony.c:889:20: warning: passing 'const char [14]' to parameter of type
'char *' discards qualifiers
[-Wincompatible-pointer-types-discards-qualifiers]
chrony_push_data("clock_stratum", "chrony", (__extension__ ({ unsigned
short int __v, __x = (unsigned short int)
(chrony_resp.body.tracking.f_stratum); if (__builtin_constant_p (__x))
__v = ((unsigned short int) ((((__x) >> 8) & 0xff) | (((__x) & 0xff) <<
8))); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc");
__v; })));
^~~~~~~~~~~~~~~
Fixes a couple of dozen of these warnings:
chrony.c:889:20: warning: passing 'const char [14]' to parameter of type
'char *' discards qualifiers
[-Wincompatible-pointer-types-discards-qualifiers]
chrony_push_data("clock_stratum", "chrony", (__extension__ ({ unsigned
short int __v, __x = (unsigned short int)
(chrony_resp.body.tracking.f_stratum); if (__builtin_constant_p (__x))
__v = ((unsigned short int) ((((__x) >> 8) & 0xff) | (((__x) & 0xff) <<
8))); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc");
__v; })));
^~~~~~~~~~~~~~~
chrony plugin: fix clang warning
chrony.c:745:11: warning: declaration shadows a local variable
[-Wshadow]
int fh = open("/dev/random", 00);
^
chrony.c:745:11: warning: declaration shadows a local variable
[-Wshadow]
int fh = open("/dev/random", 00);
^
collectd.spec: add missing %endif
configure.ac: fix autoreconf warnings
configure.ac:804: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call
detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
configure.ac:804: the top level
configure.ac:804: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call
detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
configure.ac:804: the top level
Append -Werror to the right flags
testwrapper.sh: Use /bin/sh instead of /bin/bash.
We don't use any bashisms.
We don't use any bashisms.
Merge pull request #1739 from tokkee/sh/memcheck
unit tests: Run all tests through Valgrind's memcheck, if available.
unit tests: Run all tests through Valgrind's memcheck, if available.
Actually add the testwrapper.sh script.
… it's now used for running all tests.
… it's now used for running all tests.
configure: Drop unneeded AC_SUBST() calls for AC_PATH_PROG() results.
AC_PATH_PROG calls AC_SUBST for us.
AC_PATH_PROG calls AC_SUBST for us.
unit tests: Run all tests through Valgrind's memcheck, if available.
collectd.spec: add new gRPC plugin
Disable it for now as the version of protobuf-compiler
in RHEL and Fedora is too old.
Disable it for now as the version of protobuf-compiler
in RHEL and Fedora is too old.
ceph_test: Free the yajl handle.
utils_mount_test: Free dynamically allocated strings.
testing: Evaluate expressions only once in EXPECT_EQ_STR().
utils_vl_lookup: Free regexen when destroying class lists.
Else, we'll leak any memory used by the regex.
Else, we'll leak any memory used by the regex.
Merge pull request #1738 from tokkee/sh/silent
src/Makefile: Support silent build rules for pod2man.
src/Makefile: Support silent build rules for pod2man.
src/Makefile: Support silent build rules for pod2man.
Merge pull request #1699 from tokkee/sh/grpc
gRPC server plugin
gRPC server plugin
gRPC doc: Fixed typos and mention C++11 requirement.
src/Makefile: Don't unnecessarily set plugin specific CXXFLAGS.
Also, drop unneeded -lphread / -ldl from grpc's libraries.
Also, drop unneeded -lphread / -ldl from grpc's libraries.
src/Makefile: Don't set subdir-objects.
That's now done globally via configure.
That's now done globally via configure.
collectd.spec: fix rpmlint warning
collectd.src: W: summary-not-capitalized C statistics collection and
monitoring daemon
collectd.src: W: summary-not-capitalized C statistics collection and
monitoring daemon
collectd.spec: make scriptlets work on Fedora
collectd.spec: only require python26 on RHEL < 6
Otherwise the else clause in the condition matches on Fedora too.
This makes the spec build on Fedora.
Otherwise the else clause in the condition matches on Fedora too.
This makes the spec build on Fedora.
collectd.spec: disable plugins on older distro
Instead of keeping a list per RHEL version of which plugins to enable,
invert the logic and keep a list of plugins to disable when the distro
is too old. This way we only have to specify a plugin once, and this
also opens up the possibility to build on Fedora.
Instead of keeping a list per RHEL version of which plugins to enable,
invert the logic and keep a list of plugins to disable when the distro
is too old. This way we only have to specify a plugin once, and this
also opens up the possibility to build on Fedora.
Merge pull request #1737 from rubenk/pthread-cleanup
Pthread cleanup
Pthread cleanup
collectd.spec: sort list
collectd.spec: EPEL7 has a recent ganglia-devel
collectd.spec: sort plugin lists
collectd.spec: turn TODO into changelog entry
Add new Chrony plugin to rpm spec file
Remove HAVE_PTHREAD_H include guard
We can't build without pthread.h so guarding it is not necessary
anymore.
We can't build without pthread.h so guarding it is not necessary
anymore.
configure.ac: move AC_SUBST down to after define
Sort types.db
Merge pull request #1548 from bbczeuz/zseng_dev_chrony
[plugin] Chrony NTP service check
[plugin] Chrony NTP service check
src/Makefile.am: merge EXTRA_DIST variables
src/Makefile.am: remove commented out line
src/Makefile.am: remove useless assigment
zfs_arc: simplify build logic
Use BUILD_SOLARIS instead of assuming that any OS not FreeBSD or Linux is Solaris.
Use BUILD_SOLARIS instead of assuming that any OS not FreeBSD or Linux is Solaris.
src/Makefile.am: remove useless assignment
xencpu: add missing cppflags and ldflags
write_redis: append to CPPFLAGS, not CFLAGS
openvpn plugin: remove useless assignment
oracle plugin: use CPPFLAGS instead of CFLAGS
openldap plugin: use CPPFLAGS instead of CFLAGS
openldap plugin: use $PLUGIN_LDFLAGS
Just like the other plugins.
Just like the other plugins.
src/Makefile.am: remove useless assignment
mysql plugin: simplify build logic
The MySQL plugin can't be build without libmysql support.
./configure already takes care of that.
The MySQL plugin can't be build without libmysql support.
./configure already takes care of that.
lvm: add missing cppflags and ldflags to Makefile
src/Makefile.am: remove useless assignment
ipvs: simplify logic a bit
src/Makefile.am: remove useless assignment
simplify Makefile.am for nginx and write_http
They can't be build without libcurl support,
./configure will take care of that.
Remove the now unused BUILD_WITH_LIBCURL conditional
They can't be build without libcurl support,
./configure will take care of that.
Remove the now unused BUILD_WITH_LIBCURL conditional
Simplify Makefile.am for curl plugins
They can't be build without libcurl support,
./configure will take care of that.
They can't be build without libcurl support,
./configure will take care of that.
aquaero: add flags to the right variable
src/Makefile.am: merge 2 lines
src/Makefile.am: simplify Apache plugin
It can't be build without libcurl support and
configure will take care of that.
It can't be build without libcurl support and
configure will take care of that.
configure.ac: break a few long lines up
Always build with pthread support
Until now you could run ./configure --with-libpthread=no.
This didn't actually compile though.
The daemon has assumed for a while now that pthread support
is available. Bail out in ./configure if this is not the case.
Until now you could run ./configure --with-libpthread=no.
This didn't actually compile though.
The daemon has assumed for a while now that pthread support
is available. Bail out in ./configure if this is not the case.
configure.ac: remove unused HAVE_LIBPTHREAD define
unixsock plugin: stop linking with libpthread
The collectd daemon already links with it.
The collectd daemon already links with it.
statsd plugin: stop linking with libpthread
The collectd daemon already links with it.
The collectd daemon already links with it.
snmp plugin: stop linking with libpthread
The collectd daemon already links with it.
The collectd daemon already links with it.
nut plugin: stop linking with libpthread
The collectd daemon already links with it.
The collectd daemon already links with it.
notify_email plugin: stop linking with libpthread
The collectd daemon already links with it.
The collectd daemon already links with it.
network plugin: stop linking with libpthread
The collectd daemon already links with it.
The collectd daemon already links with it.
java plugin: stop linking with libpthread
The collectd daemon already links with it.
The collectd daemon already links with it.
exec plugin: stop linking with libpthread
The collectd daemon already links with it.
The collectd daemon already links with it.
email plugin: stop linking with libpthread
The collectd daemon already links with it.
The collectd daemon already links with it.
dns plugin: stop linking with libpthread
The collectd daemon already links with it.
The collectd daemon already links with it.
all plugins: remove pthread.h include
plugin.h already includes pthread.h
plugin.h already includes pthread.h
Don't hardcode libpthread
collectd_tg: let automake compute dependencies
Automake already does the right thing based on the library added with _LDADD.
This also restores a missing dependency on libheap.la.
Automake already does the right thing based on the library added with _LDADD.
This also restores a missing dependency on libheap.la.
collectd_tg: simplify logic a bit
We always link collectdctl with libcollectdclient/libcollectdclient.la.
Make this more obvious.
We always link collectdctl with libcollectdclient/libcollectdclient.la.
Make this more obvious.
collectdctl: let automake compute dependencies
Automake already does the right thing based on the library added with _LDADD
Automake already does the right thing based on the library added with _LDADD
collectdctl: simplify logic a bit
We always link collectdctl with libcollectdclient/libcollectdclient.la.
Make this more obvious.
We always link collectdctl with libcollectdclient/libcollectdclient.la.
Make this more obvious.
src/Makefile.am: let automake compute dependencies
Automake already does the right thing based on the library
added with _LDADD
Automake already does the right thing based on the library
added with _LDADD
src/Makefile.am: simplify logic a bit
We always link collectd_nagios with libcollectdclient/libcollectdclient.la.
Make this more obvious.
We always link collectd_nagios with libcollectdclient/libcollectdclient.la.
Make this more obvious.
Removed braces on single line 'if'. Always using inet_ntop.
Macro fixes, Implemented comments from code review (style, defines)