author | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 5 May 2015 19:40:09 +0000 (21:40 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 5 May 2015 19:40:09 +0000 (21:40 +0200) |
improve java detection/defaults in configure script
configure.in | patch | blob | history | |
contrib/redhat/collectd.spec | patch | blob | history | |
src/processes.c | patch | blob | history | |
src/swap.c | patch | blob | history |
diff --git a/configure.in b/configure.in
index 12874a28b969b345efb0dbb2a714f11c4df5d369..234ebf7c7a69ca8cec46bb4de953e8fc32ecbef6 100644 (file)
--- a/configure.in
+++ b/configure.in
struct mntent *me;
fh = setmntent ("/etc/mtab", "r");
me = getmntent (fh);
+return(me->mnt_passno);
]]]
)],
[c_cv_have_one_getmntent="yes"],
int status;
fh = fopen ("/etc/mnttab", "r");
status = getmntent (fh, &mt);
+ return(status);
]]]
)],
[c_cv_have_two_getmntent="yes"],
]]],
[[[
int val = PCAP_ERROR_IFACE_NOT_UP;
+ return(val);
]]]
)],
[c_cv_libpcap_have_pcap_error_iface_not_up="yes"],
index ce715ea120ec9959206b00fcab6c99204df73e8b..e9e71d631aa1509fe4f7c404c9a05ffc4f52dc37 100644 (file)
# plugin zfs_arc disabled, requires FreeBSD/Solaris
%define with_zfs_arc 0%{!?_without_zfs_arc:0}
-Summary: Statistics collection daemon for filling RRD files
+Summary: statistics collection and monitoring daemon
Name: collectd
Version: 5.3.2
Release: 1%{?dist}
%if %{with_dbi}
%define _with_dbi --enable-dbi
%else
-%define _with_dbi --disable-dbi --without-libdbi
+%define _with_dbi --disable-dbi
%endif
%if %{with_df}
%if %{with_notify_email}
%define _with_notify_email --enable-notify_email
%else
-%define _with_notify_email --disable-notify_email --without-libesmpt
+%define _with_notify_email --disable-notify_email
%endif
%if %{with_ntpd}
%if %{with_perl}
%define _with_perl --enable-perl --with-perl-bindings="INSTALLDIRS=vendor"
%else
-%define _with_perl --disable-perl --without-libperl
+%define _with_perl --disable-perl
%endif
%if %{with_pf}
%if %{with_write_mongodb}
%define _with_write_mongodb --enable-write_mongodb
%else
-%define _with_write_mongodb --disable-write_mongodb --without-libmongoc
+%define _with_write_mongodb --disable-write_mongodb
%endif
%if %{with_write_redis}
%define _with_write_redis --enable-write_redis
%else
-%define _with_write_redis --disable-write_redis --without-libcredis
+%define _with_write_redis --disable-write_redis
%endif
%if %{with_write_riemann}
%if %{with_thermal}
%{_libdir}/%{name}/thermal.so
%endif
-%if %{with_load}
+%if %{with_threshold}
%{_libdir}/%{name}/threshold.so
%endif
%if %{with_unixsock}
diff --git a/src/processes.c b/src/processes.c
index c77859d9e7d9f6953abe3fb87c3e16aebdd44357..d6b48452ef44416078308ed2402e373b8c21a411 100644 (file)
--- a/src/processes.c
+++ b/src/processes.c
int wait = 0;
kvm_t *kd;
- char errbuf[1024];
+ char errbuf[_POSIX2_LINE_MAX];
struct kinfo_proc *procs; /* array of processes */
struct kinfo_proc *proc_ptr = NULL;
int count; /* returns number of processes */
ps_list_reset ();
/* Open the kvm interface, get a descriptor */
- kd = kvm_open (NULL, NULL, NULL, 0, errbuf);
+ kd = kvm_openfiles (NULL, "/dev/null", NULL, 0, errbuf);
if (kd == NULL)
{
ERROR ("processes plugin: Cannot open kvm interface: %s",
diff --git a/src/swap.c b/src/swap.c
index 1621f7af677a2a83ee866ee752cece72fcea3c60..fb50cf38bae32639361d3e4d1ae1aaa4a0348452 100644 (file)
--- a/src/swap.c
+++ b/src/swap.c
/* #endif defined(VM_SWAPUSAGE) */
#elif HAVE_LIBKVM_GETSWAPINFO
+ char errbuf[_POSIX2_LINE_MAX];
+
if (kvm_obj != NULL)
{
kvm_close (kvm_obj);
kvm_pagesize = getpagesize ();
- if ((kvm_obj = kvm_open (NULL, /* execfile */
- NULL, /* corefile */
- NULL, /* swapfile */
- O_RDONLY, /* flags */
- NULL)) /* errstr */
- == NULL)
+ kvm_obj = kvm_openfiles (NULL, "/dev/null", NULL, O_RDONLY, errbuf);
+
+ if (kvm_obj == NULL)
{
- ERROR ("swap plugin: kvm_open failed.");
+ ERROR ("swap plugin: kvm_openfiles failed, %s", errbuf);
return (-1);
}
/* #endif HAVE_LIBKVM_GETSWAPINFO */