-2006-04-02, Version 3.9.0
+2006-04-21, Version 3.9.1
+ * Build issues with Solaris and possible other architectures have been
+ resolved.
+ * Problems when building the `apache'-plugin without `libcurl' have
+ been resolved.
+ * A bug in the `ping' plugin has been fixed. Sorry folks.
+
+2006-04-15, Version 3.9.0
* A plugin to monitor the Apache webserver has been added.
<http://httpd.apache.org/>
* A plugin to collect statistics about virtual servers using VServer.
Summary: Statistics collection daemon for filling RRD files.
Name: collectd
-Version: 3.9.0
+Version: 3.9.1
Release: 1
Source: http://collectd.org/files/%{name}-%{version}.tar.gz
License: GPL
%attr(0444,root,root) %{_libdir}/%{name}/sensors.so*
%changelog
+* Fri Apr 21 2006 Florian octo Forster <octo@verplant.org> 3.9.1-1
+- New upstream version
+
* Fri Apr 14 2006 Florian octo Forster <octo@verplant.org> 3.9.0-1
- New upstream version
- Added the `apache' package.
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(collectd, 3.9.0)
+AC_INIT(collectd, 3.9.1)
AC_CONFIG_SRCDIR(src/collectd.c)
AC_CONFIG_HEADERS(src/config.h)
AM_INIT_AUTOMAKE(dist-bzip2)
# For load module
AC_CHECK_HEADERS(sys/loadavg.h)
+# For the swap module
+AC_CHECK_HEADERS(sys/swap.h)
+
# For users module
AC_CHECK_HEADERS(utmp.h)
AC_CHECK_HEADERS(utmpx.h)
#
AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNCS(gettimeofday select strdup strtol)
-AC_CHECK_FUNCS(socket, , AC_CHECK_LIB(socket, socket))
AC_CHECK_FUNCS(getaddrinfo getnameinfo)
AC_CHECK_FUNCS(strchr memcpy strstr strcmp strncmp strncpy strlen)
AC_CHECK_FUNCS(strncasecmp strcasecmp)
AC_CHECK_FUNCS(openlog syslog closelog)
+socket_needs_socket="no"
+AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
+AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
+
+nanosleep_needs_rt="no"
+AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
+AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
+
# For cpu module
AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
esac
AC_MSG_RESULT([$ac_system])
-with_libsocket="yes"
-AC_CHECK_LIB(socket, socket,
-[
- AC_DEFINE(HAVE_LIBSOCKET, 1, [Define to 1 if you have the 'socket' library (-lsocket).])
-],
-[with_libsocket="no"])
-AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$with_libsocket" = "xyes")
-
with_libresolv="yes"
AC_CHECK_LIB(resolv, res_search,
[
if test "$ac_system" = "Solaris"
then
with_kstat="yes"
+ with_devinfo="yes"
else
with_kstat="no (Solaris only)"
+ with_devinfo="no (Solaris only)"
fi
+
if test "x$with_kstat" = "xyes"
then
AC_CHECK_LIB(kstat, kstat_open,, [with_kstat="no (libkstat not found)"])
fi
if test "x$with_kstat" = "xyes"
then
- AC_CHECK_LIB(devinfo, di_init)
+ AC_CHECK_LIB(devinfo, di_init,, [with_devinfo="no (not found)"])
AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
fi
if test "x$with_kstat" = "xyes"
fi
AC_DEFINE_UNQUOTED(COLLECT_KSTAT, [$collect_kstat],
[Wether or not to use kstat library (Solaris)])
-AM_CONDITIONAL(BUILD_WITH_KSTAT, test "x$with_kstat" = "xyes")
+AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
+AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
### BEGIN of check for libcurl ###
with_curl_config="curl-config"
+collectd (3.9.1-1) unstable; urgency=low
+
+ * New upstream version
+
+ -- Florian Forster <octo@verplant.org> Fri, 21 Apr 2006 17:38:08 +0200
+
collectd (3.9.0-1) unstable; urgency=low
* New upstream version
if BUILD_WITH_RRDTOOL
collectd_LDFLAGS += -lm -lrrd
endif
+if BUILD_WITH_LIBRT
+collectd_LDFLAGS += -lrt
+endif
if BUILD_WITH_LIBSOCKET
collectd_LDFLAGS += -lsocket
endif
if BUILD_WITH_LIBRESOLV
collectd_LDFLAGS += -lresolv
endif
+if BUILD_WITH_LIBKSTAT
+collectd_LDFLAGS += -lkstat
+endif
+if BUILD_WITH_LIBDEVINFO
+collectd_LDFLAGS += -ldevinfo
+endif
collectd_LDADD = $(LIBLTDL) libconfig/libconfig.la "-dlopen" self
collectd_DEPENDENCIES = $(LIBLTDL) libconfig/libconfig.la
pkglib_LTLIBRARIES += cpu.la
cpu_la_SOURCES = cpu.c
cpu_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBKSTAT
+cpu_la_LDFLAGS += -lkstat
+endif
+if BUILD_WITH_LIBDEVINFO
+cpu_la_LDFLAGS += -ldevinfo
+endif
collectd_LDADD += "-dlopen" cpu.la
collectd_DEPENDENCIES += cpu.la
endif
pkglib_LTLIBRARIES += disk.la
disk_la_SOURCES = disk.c
disk_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBKSTAT
+disk_la_LDFLAGS += -lkstat
+endif
+if BUILD_WITH_LIBDEVINFO
+disk_la_LDFLAGS += -ldevinfo
+endif
collectd_LDADD += "-dlopen" disk.la
collectd_DEPENDENCIES += disk.la
endif
pkglib_LTLIBRARIES += hddtemp.la
hddtemp_la_SOURCES = hddtemp.c
hddtemp_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBSOCKET
+hddtemp_la_LDFLAGS += -lsocket
+endif
collectd_LDADD += "-dlopen" hddtemp.la
collectd_DEPENDENCIES += hddtemp.la
endif
pkglib_LTLIBRARIES += memory.la
memory_la_SOURCES = memory.c
memory_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBKSTAT
+memory_la_LDFLAGS += -lkstat
+endif
+if BUILD_WITH_LIBDEVINFO
+memory_la_LDFLAGS += -ldevinfo
+endif
collectd_LDADD += "-dlopen" memory.la
collectd_DEPENDENCIES += memory.la
endif
pkglib_LTLIBRARIES += swap.la
swap_la_SOURCES = swap.c
swap_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBKSTAT
+swap_la_LDFLAGS += -lkstat
+endif
+if BUILD_WITH_LIBDEVINFO
+swap_la_LDFLAGS += -ldevinfo
+endif
collectd_LDADD += "-dlopen" swap.la
collectd_DEPENDENCIES += swap.la
endif
pkglib_LTLIBRARIES += tape.la
tape_la_SOURCES = tape.c
tape_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBKSTAT
+tape_la_LDFLAGS += -lkstat
+endif
+if BUILD_WITH_LIBDEVINFO
+tape_la_LDFLAGS += -ldevinfo
+endif
collectd_LDADD += "-dlopen" tape.la
collectd_DEPENDENCIES += tape.la
endif
pkglib_LTLIBRARIES += traffic.la
traffic_la_SOURCES = traffic.c
traffic_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBKSTAT
+traffic_la_LDFLAGS += -lkstat
+endif
+if BUILD_WITH_LIBDEVINFO
+traffic_la_LDFLAGS += -ldevinfo
+endif
collectd_LDADD += "-dlopen" traffic.la
collectd_DEPENDENCIES += traffic.la
endif
static char *user = NULL;
static char *pass = NULL;
-#if APACHE_HAVE_READ
+#if HAVE_LIBCURL
static CURL *curl = NULL;
static char apache_buffer[4096];
static int apache_buffer_len = 0;
static char apache_curl_error[CURL_ERROR_SIZE];
-#endif
+#endif /* HAVE_LIBCURL */
/* Limit to 2^27 bytes/s. That's what a gigabit-ethernet link can handle, in
* theory. */
};
static int config_keys_num = 3;
-
+#if HAVE_LIBCURL
static size_t apache_curl_callback (void *buf, size_t size, size_t nmemb, void *stream)
{
size_t len = size * nmemb;
return (len);
}
+#endif /* HAVE_LIBCURL */
static int config_set (char **var, char *value)
{
static void init (void)
{
-#if APACHE_HAVE_READ
+#if HAVE_LIBCURL
static char credentials[1024];
if (curl != NULL)
{
curl_easy_setopt (curl, CURLOPT_URL, url);
}
-#endif /* APACHE_HAVE_READ */
+#endif /* HAVE_LIBCURL */
}
static void bytes_write (char *host, char *inst, char *val)
return (1);
}
- fprintf (fh, "%d\n", getpid());
+ fprintf (fh, "%i\n", (int) getpid ());
fclose(fh);
return (0);
/* The `%.*s' is needed because there is no null-byte behind
* the name. */
- fprintf(log, ",%.*s", (tmp - name), name);
+ fprintf(log, ",%.*s", (int) (tmp - name), name);
}
fprintf(log, "\n");
fclose(log);
strncpy (full_file, file, 1024);
tmp = full_file + strlen (full_file) - 4;
- assert (tmp > 0);
+ assert ((tmp != NULL) && (tmp > full_file));
/* Change the filename for logfiles. */
if (strncmp (tmp, ".rrd", 4) == 0)
if ((entry = (hddname_t *) malloc (sizeof (hddname_t))) == NULL)
{
- syslog (LOG_ERR, "hddtemp: malloc (%u) == NULL", sizeof (hddname_t));
+ syslog (LOG_ERR, "hddtemp: malloc (%u) == NULL",
+ (unsigned int) sizeof (hddname_t));
free (name);
continue;
}
#liboping_la_CFLAGS =
liboping_la_LDFLAGS = -avoid-version
+if BUILD_WITH_LIBSOCKET
+liboping_la_LDFLAGS += -lsocket
+endif
liboping_la_SOURCES = liboping.h liboping.c
obj->head = NULL;
+ obj->timeout = PING_DEF_TIMEOUT;
+ obj->ttl = PING_DEF_TTL;
+ obj->addrfamily = PING_DEF_AF;
+
return (obj);
}
#define MODULE_NAME "nfs"
-#if defined(KERNEL_LINUX) || defined(HAVE_LIBKSTAT)
+/* #if defined(KERNEL_LINUX) || defined(HAVE_LIBKSTAT) */
+#if KERNEL_LINUX
# define NFS_HAVE_READ 1
#else
# define NFS_HAVE_READ 0
};
static int nfs3_procedures_ds_num = 22;
-#ifdef HAVE_LIBKSTAT
+#if HAVE_LIBKSTAT && 0
extern kstat_ctl_t *kc;
static kstat_t *nfs2_ksp_client;
static kstat_t *nfs2_ksp_server;
static void nfs_init (void)
{
-#ifdef HAVE_LIBKSTAT
+#if HAVE_LIBKSTAT && 0
kstat_t *ksp_chain;
nfs2_ksp_client = NULL;
}
#endif /* NFS_HAVE_READ */
-#if defined(KERNEL_LINUX)
+#if KERNEL_LINUX
static void nfs_read_stats_file (FILE *fh, char *inst)
{
char buffer[BUFSIZE];
#endif /* defined(KERNEL_LINUX) */
#undef BUFSIZE
-#ifdef HAVE_LIBKSTAT
+#if HAVE_LIBKSTAT && 0
static void nfs2_read_kstat (kstat_t *ksp, char *inst)
{
unsigned long long values[18];
#if NFS_HAVE_READ
static void nfs_read (void)
{
-#if defined(KERNEL_LINUX)
+#if KERNEL_LINUX
FILE *fh;
if ((fh = fopen ("/proc/net/rpc/nfs", "r")) != NULL)
/* #endif defined(KERNEL_LINUX) */
-#elif defined(HAVE_LIBKSTAT)
+#elif HAVE_LIBKSTAT && 0
if (nfs2_ksp_client != NULL)
nfs2_read_kstat (nfs2_ksp_client, "client");
if (nfs2_ksp_server != NULL)
return (1);
}
- if ((reg_handle = lt_dlsym (dlh, "module_register")) == NULL)
+ if ((reg_handle = (void (*) (void)) lt_dlsym (dlh, "module_register")) == NULL)
{
syslog (LOG_WARNING, "Couldn't find symbol ``module_register'' in ``%s'': %s\n",
file, lt_dlerror ());
# define SWAP_HAVE_READ 0
#endif
-#ifdef KERNEL_SOLARIS
-#include <sys/swap.h>
-#endif /* KERNEL_SOLARIS */
+#if HAVE_SYS_SWAP_H
+# include <sys/swap.h>
+#endif
#undef MAX
#define MAX(x,y) ((x) > (y) ? (x) : (y))
{
char buffer[512];
- if (snprintf (buffer, 512, "N:%llu:%llu:%llu:%llu", swap_used,
- swap_free, swap_cached, swap_resv) >= 512)
+ if (snprintf (buffer, 512, "%u:%llu:%llu:%llu:%llu", (unsigned int) curtime,
+ swap_used, swap_free, swap_cached, swap_resv) >= 512)
return;
plugin_submit (MODULE_NAME, "-", buffer);