Skip to content

Commit

Permalink
Merge branch 'collectd-4.3' into collectd-4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Forster committed Apr 29, 2008
2 parents 409d900 + c74b709 commit 0aad516
Show file tree
Hide file tree
Showing 7 changed files with 218 additions and 154 deletions.
30 changes: 30 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
2008-04-22, Version 4.3.3
* build system: Improved detection of several libraries, especially if
they are in non-standard paths.
* build system: Portability fixes: Automatically define "_REENTRANT"
if the libc expects it.
* collectd: Error and warning messages have been improved.
* collectd: Check for the BYTE_ORDER and BIG_ENDIAN defines before
using them.
* apache plugin: Allocate new memory when reading a webpage instead of
using a buffer of static size.
* exec plugin: Close (almost) all filedescriptors before exec(2)ing
the program.
* hddtemp plugin: Error and warning messages have been improved.
* sensors plugin: Fix sensor collection for some chip types.

2008-03-29, Version 4.3.2
* collectd: Fix configuration of the `FailureMax', `WarningMax', and
`Persist' threshold options.
Expand Down Expand Up @@ -59,6 +74,21 @@
physical server. Thanks to Richard Jones from Red Hat's Emerging
Technology group for this plugin.

2008-04-22, Version 4.2.7
* build system: Improved detection of several libraries, especially if
they are in non-standard paths.
* build system: Portability fixes: Automatically define "_REENTRANT"
if the libc expects it.
* collectd: Error and warning messages have been improved.
* collectd: Check for the BYTE_ORDER and BIG_ENDIAN defines before
using them.
* apache plugin: Allocate new memory when reading a webpage instead of
using a buffer of static size.
* exec plugin: Close (almost) all filedescriptors before exec(2)ing
the program.
* hddtemp plugin: Error and warning messages have been improved.
* sensors plugin: Fix sensor collection for some chip types.

2008-03-29, Version 4.2.6
* collectd: Improved error messages when parsing the configuration.
* sensors plugin: Fix temperature collection with libsensors4.
Expand Down
124 changes: 106 additions & 18 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,9 @@ AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, ks
#endif
])

#
# Checks for libraries begin here
#
with_libresolv="yes"
AC_CHECK_LIB(resolv, res_search,
[
Expand Down Expand Up @@ -1105,12 +1108,14 @@ AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
AC_DEFINE_UNQUOTED(COLLECT_LIBIOKIT, [$collect_libiokit], [Wether or not to use the IOKit library])
AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")

with_libstatgrab_cflags=""
with_libstatgrab_ldflags=""
AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
[
if test "x$withval" != "xno" -a "x$withval" != "xyes"
then
LDFLAGS="$LDFLAGS -L$withval/lib"
CPPFLAGS="$CPPFLAGS -I$withval/include"
with_libstatgrab_cflags="-I$withval/include"
with_libstatgrab_ldflags="-L$withval/lib"
with_libstatgrab="yes"
else
with_libstatgrab="$withval"
Expand All @@ -1124,28 +1129,93 @@ AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [P
with_libstatgrab="no"
fi
])
if test "x$with_libstatgrab" = "xyes"
with_libstatgrab_pkg_config="yes"
if test "x$with_libstatgrab" = "xyes" \
&& test "x$PKG_CONFIG" != "x"
then
AC_MSG_CHECKING([pkg-config for libstatgrab])
temp_result="found"
$PKG_CONFIG --exists libstatgrab 2>/dev/null
if test "$?" != "0"
then
with_libstatgrab_pkg_config="no"
temp_result="not found"
fi
AC_MSG_RESULT([$temp_result])
else
AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
with_libstatgrab_pkg_config="no"
with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
fi

if test "x$with_libstatgrab" = "xyes" \
&& test "x$with_libstatgrab_pkg_config" = "xyes" \
&& test "x$with_libstatgrab_cflags" = "x"
then
AC_CHECK_LIB(statgrab, sg_init, [with_libstatgrab="yes"], [with_libstatgrab="no (libstatgrab not found)"])
AC_MSG_CHECKING([for libstatgrab CFLAGS])
temp_result="`$PKG_CONFIG --cflags libstatgrab`"
if test "$?" = "0"
then
with_libstatgrab_cflags="$temp_result"
else
with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
temp_result="$PKG_CONFIG --cflags libstatgrab failed"
fi
AC_MSG_RESULT([$temp_result])
fi
if test "x$with_libstatgrab" = "xyes"

if test "x$with_libstatgrab" = "xyes" \
&& test "x$with_libstatgrab_pkg_config" = "xyes" \
&& test "x$with_libstatgrab_ldflags" = "x"
then
AC_CHECK_HEADERS(statgrab.h,, [with_libstatgrab="no (statgrab.h not found)"])
AC_MSG_CHECKING([for libstatgrab LDFLAGS])
temp_result="`$PKG_CONFIG --libs libstatgrab`"
if test "$?" = "0"
then
with_libstatgrab_ldflags="$temp_result"
else
with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
temp_result="$PKG_CONFIG --libs libstatgrab failed"
fi
AC_MSG_RESULT([$temp_result])
fi

if test "x$with_libstatgrab" = "xyes"
then
AC_CHECK_LIB(devstat, getdevs, [with_libdevstat="yes"], [with_libdevstat="no"])
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"

AC_CHECK_HEADERS(statgrab.h,
[with_libstatgrab="yes"],
[with_libstatgrab="no (statgrab.h not found)"])

CPPFLAGS="$SAVE_CPPFLAGS"
fi

if test "x$with_libstatgrab" = "xyes"
then
collect_libstatgrab=1
else
collect_libstatgrab=0
SAVE_CFLAGS="$CFLAGS"
SAVE_LDFLAGS="$LDFLAGS"

CFLAGS="$CFLAGS $with_libstatgrab_cflags"
LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"

AC_CHECK_LIB(statgrab, sg_init,
[with_libstatgrab="yes"],
[with_libstatgrab="no (symbol sg_init not found)"])

CFLAGS="$SAVE_CFLAGS"
LDFLAGS="$SAVE_LDFLAGS"
fi
AC_DEFINE_UNQUOTED(COLLECT_LIBSTATGRAB, [$collect_libstatgrab],
[Wether or not to use statgrab library])

AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
AM_CONDITIONAL(BUILD_WITH_LIBDEVSTAT, test "x$with_libdevstat" = "xyes")
if test "x$with_libstatgrab" = "xyes"
then
BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
fi

AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_libkvm="yes"], [with_libkvm="no"])
if test "x$with_libkvm" = "xyes"
Expand Down Expand Up @@ -1437,9 +1507,19 @@ AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to l
with_libperl="yes"
])

AC_MSG_CHECKING([for perl])
perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
if test -x "$perl_interpreter"
then
AC_MSG_RESULT([yes])
else
perl_interpreter=""
AC_MSG_RESULT([no])
fi

AC_SUBST(PERL, "$perl_interpreter")

if test "x$with_libperl" = "xyes"
if test "x$with_libperl" = "xyes" -a -n "$perl_interpreter"
then
SAVE_CFLAGS=$CFLAGS
SAVE_LDFLAGS=$LDFLAGS
Expand Down Expand Up @@ -1479,7 +1559,10 @@ then

CFLAGS=$SAVE_CFLAGS
LDFLAGS=$SAVE_LDFLAGS
fi
else if test -z "$perl_interpreter"; then
with_libperl="no (no perl interpreter found)"
have_libperl="no"
fi; fi
AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")

if test "x$with_libperl" = "xyes"
Expand Down Expand Up @@ -2005,7 +2088,7 @@ fi
if test "x$with_libxml2" = "xyes"
then
SAVE_CFLAGS="$CFLAGS"
SAVE_LD_FLAGS="$LDFLAGS"
SAVE_LDFLAGS="$LDFLAGS"

CFLAGS="$CFLAGS $with_libxml2_cflags"
LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
Expand Down Expand Up @@ -2050,7 +2133,7 @@ fi
if test "x$with_libvirt" = "xyes"
then
SAVE_CFLAGS="$CFLAGS"
SAVE_LD_FLAGS="$LDFLAGS"
SAVE_LDFLAGS="$LDFLAGS"

CFLAGS="$CFLAGS $with_libvirt_cflags"
LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
Expand Down Expand Up @@ -2417,7 +2500,12 @@ AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@
],
[
PERL_BINDINGS_OPTIONS=""
with_perl_bindings="yes"
if test -n "$perl_interpreter"
then
with_perl_bindings="yes"
else
with_perl_bindings="no (no perl interpreter found)"
fi
])
if test "x$with_perl_bindings" = "xyes"
then
Expand Down
108 changes: 32 additions & 76 deletions contrib/collection.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -2344,84 +2344,40 @@ sub load_graph_definitions
'GPRINT:avg:LAST:%5.1lf%sV Last\l'
],
vs_threads => [
"DEF:total_avg={file}:total:AVERAGE",
"DEF:total_min={file}:total:MIN",
"DEF:total_max={file}:total:MAX",
"DEF:running_avg={file}:running:AVERAGE",
"DEF:running_min={file}:running:MIN",
"DEF:running_max={file}:running:MAX",
"DEF:uninterruptible_avg={file}:uninterruptible:AVERAGE",
"DEF:uninterruptible_min={file}:uninterruptible:MIN",
"DEF:uninterruptible_max={file}:uninterruptible:MAX",
"DEF:onhold_avg={file}:onhold:AVERAGE",
"DEF:onhold_min={file}:onhold:MIN",
"DEF:onhold_max={file}:onhold:MAX",
"LINE1:total_avg#$FullYellow:Total ",
'GPRINT:total_min:MIN:%5.1lf Min,',
'GPRINT:total_avg:AVERAGE:%5.1lf Avg.,',
'GPRINT:total_max:MAX:%5.1lf Max,',
'GPRINT:total_avg:LAST:%5.1lf Last\l',
"LINE1:running_avg#$FullRed:Running ",
'GPRINT:running_min:MIN:%5.1lf Min,',
'GPRINT:running_avg:AVERAGE:%5.1lf Avg.,',
'GPRINT:running_max:MAX:%5.1lf Max,',
'GPRINT:running_avg:LAST:%5.1lf Last\l',
"LINE1:uninterruptible_avg#$FullGreen:Unintr ",
'GPRINT:uninterruptible_min:MIN:%5.1lf Min,',
'GPRINT:uninterruptible_avg:AVERAGE:%5.1lf Avg.,',
'GPRINT:uninterruptible_max:MAX:%5.1lf Max,',
'GPRINT:uninterruptible_avg:LAST:%5.1lf Last\l',
"LINE1:onhold_avg#$FullBlue:Onhold ",
'GPRINT:onhold_min:MIN:%5.1lf Min,',
'GPRINT:onhold_avg:AVERAGE:%5.1lf Avg.,',
'GPRINT:onhold_max:MAX:%5.1lf Max,',
'GPRINT:onhold_avg:LAST:%5.1lf Last\l'
],
vs_memory => [
'DEF:vm_avg={file}:vm:AVERAGE',
'DEF:vm_min={file}:vm:MIN',
'DEF:vm_max={file}:vm:MAX',
'DEF:vml_avg={file}:vml:AVERAGE',
'DEF:vml_min={file}:vml:MIN',
'DEF:vml_max={file}:vml:MAX',
'DEF:rss_avg={file}:rss:AVERAGE',
'DEF:rss_min={file}:rss:MIN',
'DEF:rss_max={file}:rss:MAX',
'DEF:anon_avg={file}:anon:AVERAGE',
'DEF:anon_min={file}:anon:MIN',
'DEF:anon_max={file}:anon:MAX',
"LINE1:vm_avg#$FullYellow:VM ",
'GPRINT:vm_min:MIN:%5.1lf%s Min,',
'GPRINT:vm_avg:AVERAGE:%5.1lf%s Avg.,',
'GPRINT:vm_max:MAX:%5.1lf%s Avg.,',
'GPRINT:vm_avg:LAST:%5.1lf%s Last\l',
"LINE1:vml_avg#$FullRed:Locked ",
'GPRINT:vml_min:MIN:%5.1lf%s Min,',
'GPRINT:vml_avg:AVERAGE:%5.1lf%s Avg.,',
'GPRINT:vml_max:MAX:%5.1lf%s Avg.,',
'GPRINT:vml_avg:LAST:%5.1lf%s Last\l',
"LINE1:rss_avg#$FullGreen:RSS ",
'GPRINT:rss_min:MIN:%5.1lf%s Min,',
'GPRINT:rss_avg:AVERAGE:%5.1lf%s Avg.,',
'GPRINT:rss_max:MAX:%5.1lf%s Avg.,',
'GPRINT:rss_avg:LAST:%5.1lf%s Last\l',
"LINE1:anon_avg#$FullBlue:Anon. ",
'GPRINT:anon_min:MIN:%5.1lf%s Min,',
'GPRINT:anon_avg:AVERAGE:%5.1lf%s Avg.,',
'GPRINT:anon_max:MAX:%5.1lf%s Avg.,',
'GPRINT:anon_avg:LAST:%5.1lf%s Last\l',
"DEF:avg={file}:value:AVERAGE",
"DEF:min={file}:value:MIN",
"DEF:max={file}:value:MAX",
"AREA:max#$HalfBlue",
"AREA:min#$Canvas",
"LINE1:avg#$FullBlue:Threads",
'GPRINT:min:MIN:%5.1lf Min,',
'GPRINT:avg:AVERAGE:%5.1lf Avg.,',
'GPRINT:max:MAX:%5.1lf Max,',
'GPRINT:avg:LAST:%5.1lf Last\l',
],
vs_memory => ['-b', '1024', '-v', 'Bytes',
"DEF:avg={file}:value:AVERAGE",
"DEF:min={file}:value:MIN",
"DEF:max={file}:value:MAX",
"AREA:max#$HalfBlue",
"AREA:min#$Canvas",
"LINE1:avg#$FullBlue:",
'GPRINT:min:MIN:%5.1lf%sbytes Min,',
'GPRINT:avg:AVERAGE:%5.1lf%sbytes Avg.,',
'GPRINT:max:MAX:%5.1lf%sbytes Max,',
'GPRINT:avg:LAST:%5.1lf%sbytes Last\l',
],
vs_processes => [
'DEF:proc_avg={file}:total:AVERAGE',
'DEF:proc_min={file}:total:MIN',
'DEF:proc_max={file}:total:MAX',
"AREA:proc_max#$HalfBlue",
"AREA:proc_min#$Canvas",
"LINE1:proc_avg#$FullBlue:Processes",
'GPRINT:proc_min:MIN:%4.1lf Min,',
'GPRINT:proc_avg:AVERAGE:%4.1lf Avg.,',
'GPRINT:proc_max:MAX:%4.1lf Max,',
'GPRINT:proc_avg:LAST:%4.1lf Last\l'
"DEF:avg={file}:value:AVERAGE",
"DEF:min={file}:value:MIN",
"DEF:max={file}:value:MAX",
"AREA:max#$HalfBlue",
"AREA:min#$Canvas",
"LINE1:avg#$FullBlue:Processes",
'GPRINT:min:MIN:%5.1lf Min,',
'GPRINT:avg:AVERAGE:%5.1lf Avg.,',
'GPRINT:max:MAX:%5.1lf Max,',
'GPRINT:avg:LAST:%5.1lf Last\l',
],
};
$GraphDefs->{'if_multicast'} = $GraphDefs->{'ipt_packets'};
Expand Down
3 changes: 2 additions & 1 deletion contrib/migrate-3-4.px
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ our %TypeSplit =

our %TypeRename =
(
traffic => { from => [qw(incoming outgoing)], to => [qw(rx tx)] }
traffic => { from => [qw(incoming outgoing)], to => [qw(rx tx)] },
vs_processes => { from => [qw(total)], to => [qw(value)] },
);

GetOptions ("indir|i=s" => \$InDir,
Expand Down
Loading

0 comments on commit 0aad516

Please sign in to comment.