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"],
# --with-java {{{
with_java_home="$JAVA_HOME"
+if test "x$with_java_home" = "x"
+then
+ with_java_home="/usr/lib/jvm"
+fi
with_java_vmtype="client"
with_java_cflags=""
with_java_libs=""
if test -d "$with_java_home"
then
AC_MSG_CHECKING([for jni.h])
- TMPVAR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
+ TMPVAR=`find -L "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
if test "x$TMPVAR" != "x"
then
AC_MSG_RESULT([found in $TMPVAR])
fi
AC_MSG_CHECKING([for jni_md.h])
- TMPVAR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
+ TMPVAR=`find -L "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
if test "x$TMPVAR" != "x"
then
AC_MSG_RESULT([found in $TMPVAR])
fi
AC_MSG_CHECKING([for libjvm.so])
- TMPVAR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
+ TMPVAR=`find -L "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
if test "x$TMPVAR" != "x"
then
AC_MSG_RESULT([found in $TMPVAR])
if test "x$JAVAC" = "x"
then
AC_MSG_CHECKING([for javac])
- TMPVAR=`find "$with_java_home" -name javac -type f 2>/dev/null | head -n 1`
+ TMPVAR=`find -L "$with_java_home" -name javac -type f 2>/dev/null | head -n 1`
if test "x$TMPVAR" != "x"
then
JAVAC="$TMPVAR"
if test "x$JAR" = "x"
then
AC_MSG_CHECKING([for jar])
- TMPVAR=`find "$with_java_home" -name jar -type f 2>/dev/null | head -n 1`
+ TMPVAR=`find -L "$with_java_home" -name jar -type f 2>/dev/null | head -n 1`
if test "x$TMPVAR" != "x"
then
JAR="$TMPVAR"
]]],
[[[
int val = PCAP_ERROR_IFACE_NOT_UP;
+ return(val);
]]]
)],
[c_cv_libpcap_have_pcap_error_iface_not_up="yes"],
# plugin xmms disabled, requires xmms
%define with_xmms 0%{!?_without_xmms:0}
-Summary: Statistics collection daemon for filling RRD files
+Summary: statistics collection and monitoring daemon
Name: collectd
Version: 5.4.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}
%if %{with_thermal}
%{_libdir}/%{name}/thermal.so
%endif
-%if %{with_load}
+%if %{with_threshold}
%{_libdir}/%{name}/threshold.so
%endif
%if %{with_unixsock}
if (e->type != MD_TYPE_STRING)
{
- ERROR ("meta_data_get_signed_int: Type mismatch for key `%s'", e->key);
+ ERROR ("meta_data_get_string: Type mismatch for key `%s'", e->key);
pthread_mutex_unlock (&md->lock);
return (-ENOENT);
}
if (config_block != NULL)
{
-
cjni_config_perform (config_block);
oconfig_free (config_block);
- config_block = NULL;
}
if (jvm == NULL)
/**
* collectd - src/libcollectdclient/network.c
- * Copyright (C) 2005-2013 Florian Forster
+ * Copyright (C) 2005-2015 Florian Forster
* Copyright (C) 2010 Max Henkel
*
* Permission is hereby granted, free of charge, to any person obtaining a
memset (buffer, 0, sizeof (buffer));
buffer_size = sizeof (buffer);
- lcc_network_buffer_finalize (srv->buffer);
+ status = lcc_network_buffer_finalize (srv->buffer);
+ if (status != 0)
+ {
+ lcc_network_buffer_initialize (srv->buffer);
+ return (status);
+ }
+
status = lcc_network_buffer_get (srv->buffer, buffer, &buffer_size);
lcc_network_buffer_initialize (srv->buffer);
/**
* collectd - src/libcollectdclient/network_buffer.c
- * Copyright (C) 2010-2012 Florian octo Forster
+ * Copyright (C) 2010-2015 Florian octo Forster
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
#if HAVE_LIBGCRYPT
if (nb->seclevel == SIGN)
- nb_add_signature (nb);
+ return nb_add_signature (nb);
else if (nb->seclevel == ENCRYPT)
- nb_add_encryption (nb);
+ return nb_add_encryption (nb);
#endif
return (0);
return (ci_copy);
} /* oconfig_item_t *oconfig_clone */
-void oconfig_free (oconfig_item_t *ci)
+void oconfig_free_all (oconfig_item_t *ci)
{
int i;
free (ci->values);
for (i = 0; i < ci->children_num; i++)
- oconfig_free (ci->children + i);
+ oconfig_free_all (ci->children + i);
if (ci->children != NULL)
free (ci->children);
}
+void oconfig_free (oconfig_item_t *ci)
+{
+ oconfig_free_all (ci);
+ free (ci);
+ ci = NULL;
+}
+
/*
* vim:shiftwidth=2:tabstop=8:softtabstop=2:fdm=marker
*/
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",
/* #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 */
return NULL;
}
} else {
- int64_t tmp_v;
- if (ds->ds[index].type == DS_TYPE_DERIVE)
- tmp_v = (int64_t) vl->values[index].derive;
- else if (ds->ds[index].type == DS_TYPE_ABSOLUTE)
- tmp_v = (int64_t) vl->values[index].absolute;
- else
- tmp_v = (int64_t) vl->values[index].counter;
- res = asprintf(&value_str, "%ld", tmp_v);
- if (res == -1) {
- free(ret_str);
- ERROR("write_sensu plugin: Unable to alloc memory");
- return NULL;
+ if (ds->ds[index].type == DS_TYPE_DERIVE) {
+ res = asprintf(&value_str, "%"PRIi64, vl->values[index].derive);
+ if (res == -1) {
+ free(ret_str);
+ ERROR("write_sensu plugin: Unable to alloc memory");
+ return NULL;
+ }
+ }
+ else if (ds->ds[index].type == DS_TYPE_ABSOLUTE) {
+ res = asprintf(&value_str, "%"PRIu64, vl->values[index].absolute);
+ if (res == -1) {
+ free(ret_str);
+ ERROR("write_sensu plugin: Unable to alloc memory");
+ return NULL;
+ }
+ }
+ else {
+ res = asprintf(&value_str, "%llu", vl->values[index].counter);
+ if (res == -1) {
+ free(ret_str);
+ ERROR("write_sensu plugin: Unable to alloc memory");
+ return NULL;
+ }
}
}
VERSION="`echo \"$VERSION\" | sed -e 's/-/./g'`"
-echo -n "$VERSION"
+printf "%s" "$VERSION"