+2007-02-10, Version 3.11.1
+ * df plugin: Some wrong defines have been fixed so the plugin works
+ under Solaris again.
+ * dns plugin: The usage of a struct has been fixed to work with
+ non-GNU libcs.
+ * processes plugin: Some missing defines have been added so the plugin
+ compiles cleanly under FreeBSD and presumably other UNIXes.
+
2006-12-22, Version 3.11.0
* collectd: The new command line option `-P' makes it easier for
distributors to change the location of PID-files.
- System load
(Load average over the last 1, 5 and 15 minutes)
+ - mbmon - motherboard monitoring
+ (temperature, fanspeed and voltage information)
+
- Memory utilization
(Memory occupied by running processes, page cache, buffer cache and free)
+ - Multimeter
+ (Information provided by serial multimeters, such as the «Metex M-4650CR»)
+
- MySQL server statistics
(Commands issued, handlers triggered, thread usage, query cache
utilization and traffic sent/received)
* Usual suspects: C compiler, linker, preprocessor, make, ...
- * rrdtool (headers and library; rrdtool 1.0 and 1.2 both work fine)
+ * rrdtool (optional; headers and library; rrdtool 1.0 and 1.2 both work fine)
If built without `librrd' the resulting binary will be `client only', i.e.
will send it's values via multicast and not create any RRD files itself.
+ Alternatively you can chose to write CSV-files (Comma Seperated Values)
+ instead.
* libmysqlclient (optional)
* lm-sensors (optional)
* libstatgrab may be used to collect statistics on systems other than Linux
- and/or Solaris. Note that CPU- and disk-statistics, while being provided by
- this library, are not supported in collectd right now..
+ and/or Solaris. Note that CPU- and disk-statistics, while being provided
+ by this library, are not supported in collectd right now..
<http://www.i-scream.org/libstatgrab/>
* libcurl (optional)
If you want to use the `apache' plugin
+ * librt, libsocket, libkstat, libdevinfo
+ Various standard Solaris libraries which provide system functions.
+
+ * libpthread (optional)
+ For parallelization, especially for plugins that communicate with the
+ outside, e. g. with a socket.
+
* CoreFoundation.framework and IOKit.framework
For copiling on darwin in general and the `apple_sensors' plugin in
particular.
Summary: Statistics collection daemon for filling RRD files.
Name: collectd
-Version: 3.10.0
-Release: 1
+Version: 3.11.0
+Release: 0
Source: http://collectd.org/files/%{name}-%{version}.tar.gz
License: GPL
Group: System Environment/Daemons
%setup
%build
-./configure --prefix=%{_prefix} --sbindir=%{_sbindir} --mandir=%{_mandir} --libdir=%{_libdir}
+./configure --prefix=%{_prefix} --sbindir=%{_sbindir} --mandir=%{_mandir} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir}
make
%install
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
-cp contrib/collectd.conf $RPM_BUILD_ROOT/etc/collectd.conf
+cp src/collectd.conf $RPM_BUILD_ROOT/etc/collectd.conf
cp contrib/init.d-rh7 $RPM_BUILD_ROOT/etc/rc.d/init.d/collectd
mkdir -p $RPM_BUILD_ROOT/var/lib/collectd
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.a
%attr(0444,root,root) %{_libdir}/%{name}/cpufreq.so*
%attr(0444,root,root) %{_libdir}/%{name}/df.so*
%attr(0444,root,root) %{_libdir}/%{name}/disk.so*
+%attr(0444,root,root) %{_libdir}/%{name}/dns.so
+%attr(0444,root,root) %{_libdir}/%{name}/email.so
%attr(0444,root,root) %{_libdir}/%{name}/hddtemp.so*
%attr(0444,root,root) %{_libdir}/%{name}/load.so*
+%attr(0444,root,root) %{_libdir}/%{name}/mbmon.so
%attr(0444,root,root) %{_libdir}/%{name}/memory.so*
%attr(0444,root,root) %{_libdir}/%{name}/multimeter.so*
%attr(0444,root,root) %{_libdir}/%{name}/nfs.so*
%attr(0444,root,root) %{_libdir}/%{name}/users.so*
%attr(0444,root,root) %{_libdir}/%{name}/vserver.so*
%attr(0444,root,root) %{_libdir}/%{name}/wireless.so*
+
%dir /var/lib/collectd
%files apache
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(collectd, 3.11.0)
+AC_INIT(collectd, 3.11.1)
AC_CONFIG_SRCDIR(src/collectd.c)
AC_CONFIG_HEADERS(src/config.h)
AM_INIT_AUTOMAKE(dist-bzip2)
# include <netinet/ip6.h>
#endif
])
+AC_CHECK_HEADERS(netinet/tcp.h, [], [],
+[#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP_H
+# include <netinet/ip.h>
+#endif
+])
+AC_CHECK_HEADERS(netinet/udp.h, [], [],
+[#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP_H
+# include <netinet/ip.h>
+#endif
+])
# For cpu modules
AC_CHECK_HEADERS(sys/sysctl.h sys/dkstat.h)
AC_CHECK_HEADERS(net/if_arp.h)
AC_CHECK_HEADERS(net/if_ppp.h)
AC_CHECK_HEADERS(netinet/if_ether.h)
-AC_CHECK_HEADERS(netinet/tcp.h)
-AC_CHECK_HEADERS(netinet/udp.h)
# For the multimeter plugin
AC_CHECK_HEADERS(termios.h)
#include <linux/netdevice.h>
])
+AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
+[#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP_H
+# include <netinet/ip.h>
+#endif
+#if HAVE_NETINET_UDP_H
+# include <netinet/udp.h>
+#endif
+])
+AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
+[#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP_H
+# include <netinet/ip.h>
+#endif
+#if HAVE_NETINET_UDP_H
+# include <netinet/udp.h>
+#endif
+])
+
AC_MSG_CHECKING([for kernel type ($host_os)])
case $host_os in
*linux*)
if test "x$with_kstat" = "xyes"
then
- AC_CHECK_LIB(kstat, kstat_open,, [with_kstat="no (libkstat not found)"])
+ AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
fi
if test "x$with_kstat" = "xyes"
then
- AC_CHECK_LIB(devinfo, di_init,, [with_devinfo="no (not found)"])
+ AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
fi
if test "x$with_kstat" = "xyes"
if BUILD_MODULE_DNS
pkglib_LTLIBRARIES += dns.la
-dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
+dns_la_SOURCES = dns.c
+if BUILD_WITH_LIBPCAP
+if BUILD_WITH_LIBPTHREAD
+dns_la_SOURCES += utils_dns.c utils_dns.h
+endif
+endif
dns_la_LDFLAGS = -module -avoid-version
if BUILD_WITH_LIBPCAP
dns_la_LDFLAGS += -lpcap
#include "plugin.h"
#include "configfile.h"
#include "utils_debug.h"
-#include "utils_dns.h"
#if HAVE_LIBPCAP && HAVE_LIBPTHREAD
+# include "utils_dns.h"
# include <pthread.h>
# include <pcap.h>
# include <poll.h>
};
#if PROCESSES_HAVE_READ
+#if HAVE_THREAD_INFO | KERNEL_LINUX
static const char *config_keys[] =
{
"Process",
NULL
};
static int config_keys_num = 1;
+#endif
typedef struct procstat_entry_s
{
struct procstat_entry_s *instances;
} procstat_t;
+#if HAVE_THREAD_INFO | KERNEL_LINUX
static procstat_t *list_head_g = NULL;
+#endif
#if HAVE_THREAD_INFO
static mach_port_t port_host_self;
} /* while (pse != NULL) */
} /* for (ps = list_head_g; ps != NULL; ps = ps->next) */
}
-#endif /* HAVE_THREAD_INFO | KERNEL_LINUX */
static int ps_config (const char *key, const char *value)
{
return (0);
}
+#endif /* HAVE_THREAD_INFO | KERNEL_LINUX */
static int ps_init (void)
{
plugin_register_data_set (&pagefaults_ds );
#if PROCESSES_HAVE_READ
+#if HAVE_THREAD_INFO | KERNEL_LINUX
plugin_register_config ("processes", ps_config,
config_keys, config_keys_num);
+#endif
plugin_register_init ("processes", ps_init);
plugin_register_read ("processes", ps_read);
#endif /* PROCESSES_HAVE_READ */
#include "collectd.h"
+#if HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
#if HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
# include <netdb.h>
#endif
-#if HAVE_NETINET_IN_SYSTM_H
-# include <netinet/in_systm.h>
-#endif
-#if HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
#if HAVE_NETINET_IP_H
# include <netinet/ip.h>
#endif
# define PPP_CONTROL_VAL 0x03 /* The control byte value */
#endif
-#ifdef __linux__
-#define uh_sport source
-#define uh_dport dest
+#if HAVE_STRUCT_UDPHDR_UH_DPORT && HAVE_STRUCT_UDPHDR_UH_SPORT
+# define UDP_DEST uh_dport
+# define UDP_SRC uh_dport
+#elif HAVE_STRUCT_UDPHDR_DEST && HAVE_STRUCT_UDPHDR_SOURCE
+# define UDP_DEST dest
+# define UDP_SRC source
+#else
+# error "`struct udphdr' is unusable."
#endif
#include "utils_dns.h"
const struct in6_addr *d_addr)
{
char buf[PCAP_SNAPLEN];
- if ((ntohs (udp->uh_dport) != 53)
- && (ntohs (udp->uh_sport) != 53))
+ if ((ntohs (udp->UDP_DEST) != 53)
+ && (ntohs (udp->UDP_SRC) != 53))
return 0;
memcpy(buf, udp + 1, len - sizeof(*udp));
if (0 == handle_dns(buf, len - sizeof(*udp), s_addr, d_addr))
new = cu_mount_listmntent ();
#elif HAVE_GETVFSSTAT || HAVE_GETFSSTAT
new = cu_mount_getfsstat ();
-#elif HAVE_GEN_GETMNTENT
+#elif HAVE_TWO_GETMNTENT || HAVE_GEN_GETMNTENT || HAVE_SUN_GETMNTENT
new = cu_mount_gen_getmntent ();
+#elif HAVE_SEQ_GETMNTENT
+# warn "This version of `getmntent' hat not yet been implemented!"
#elif HAVE_ONE_GETMNTENT
new = cu_mount_getmntent ();
#else