Merge branch 'collectd-4.2' into collectd-4.3
authorFlorian Forster <sifnfors@informatik.stud.uni-erlangen.de>
Tue, 22 Apr 2008 11:11:46 +0000 (13:11 +0200)
committerFlorian Forster <sifnfors@informatik.stud.uni-erlangen.de>
Tue, 22 Apr 2008 11:11:46 +0000 (13:11 +0200)
Conflicts:

ChangeLog
version-gen.sh

ChangeLog
configure.in
contrib/collection.cgi
contrib/migrate-3-4.px
src/sensors.c

index 407c57c..5508405 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
          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.
+       * 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.
+
 2008-03-29, Version 4.2.6
        * collectd: Improved error messages when parsing the configuration.
        * sensors plugin: Fix temperature collection with libsensors4.
index 036f0a5..cd2110f 100644 (file)
@@ -1436,9 +1436,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
@@ -1478,7 +1488,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"
@@ -2318,7 +2331,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
index e82388b..b8a0813 100755 (executable)
@@ -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'};
index 673929c..ed41827 100755 (executable)
@@ -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,
index 2a0a9ea..173ed9c 100644 (file)
@@ -189,14 +189,14 @@ static int sensors_snprintf_chip_name (char *buf, size_t buf_size,
        }
        else if (chip->bus == SENSORS_CHIP_NAME_BUS_DUMMY)
        {
-               snprintf (buf, buf_size, "%s-%s-%04x",
+               status = snprintf (buf, buf_size, "%s-%s-%04x",
                                chip->prefix,
                                chip->busname,
                                chip->addr);
        }
        else
        {
-               snprintf (buf, buf_size, "%s-i2c-%d-%02x",
+               status = snprintf (buf, buf_size, "%s-i2c-%d-%02x",
                                chip->prefix,
                                chip->bus,
                                chip->addr);