Bug#771524: unblock: ganglia-modules-linux/1.3.5-1
Package: release.debian.org
User: release.debian.org@packages.debian.org
UserTags: unblock
This has just been uploaded to unstable
The main reason for this unblock request:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771521
It is based on new upstream release 1.3.5 which tidies up some other
small things too:
- clarification of original license terms in copyright (some code
started as BSD, project is GPL)
- remove a #ifdef LINUX (the package is only intended for Linux, as the
name implies)
- add a metric for percentage free
The debdiff excludes autotools stuff, exact command used:
debdiff ganglia-modules-linux_1.3.4-7.dsc
ganglia-modules-linux_1.3.5-1.dsc | filterdiff -x '*/aclocal.m4' -x
'*/config.*' -x '*/configure' -x '*/depcomp' -x '*/*.in' -x
'*/install-sh' -x '*/ltmain.sh' -x '*/m4/*' -x '*/missing' >
/tmp/ganglia-modules-linux-1.3.5-1.debdiff
diff -Nru ganglia-modules-linux-1.3.4/aclocal.m4 ganglia-modules-linux-1.3.5/aclocal.m4
diff -Nru ganglia-modules-linux-1.3.4/config.guess ganglia-modules-linux-1.3.5/config.guess
diff -Nru ganglia-modules-linux-1.3.4/config.sub ganglia-modules-linux-1.3.5/config.sub
diff -Nru ganglia-modules-linux-1.3.4/configure ganglia-modules-linux-1.3.5/configure
diff -Nru ganglia-modules-linux-1.3.4/configure.ac ganglia-modules-linux-1.3.5/configure.ac
--- ganglia-modules-linux-1.3.4/configure.ac 2012-04-10 18:50:07.000000000 +0200
+++ ganglia-modules-linux-1.3.5/configure.ac 2014-11-30 13:59:08.000000000 +0100
@@ -14,7 +14,7 @@
dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_INIT(ganglia-modules-linux,1.3.4)
+AC_INIT(ganglia-modules-linux,1.3.5)
AC_CONFIG_SRCDIR(example/mod_example.c)
AM_INIT_AUTOMAKE
diff -Nru ganglia-modules-linux-1.3.4/COPYING ganglia-modules-linux-1.3.5/COPYING
--- ganglia-modules-linux-1.3.4/COPYING 2012-03-11 08:15:45.000000000 +0100
+++ ganglia-modules-linux-1.3.5/COPYING 2012-04-13 12:59:08.000000000 +0200
@@ -1,5 +1,7 @@
-----------------------------------------------------------------------------
ganglia-modules-linux: modules for collecting metrics on Linux
+ Copyright (C) 2007 Brad Nicholes, Novell (BSD license)
+ Copyright (C) 2008 JB Kim (BSD license)
Copyright (C) 2011 Daniel Pocock
This program is free software: you can redistribute it and/or modify
@@ -25,11 +27,11 @@
example module) have been copied as-is from the main Ganglia
distribution and retain the original BSD-like copyright
- the contents of the `multicpu' directory are loosely based on
- the module contributed to the main Ganglia distribution by
- Brad Nicholes (bnicholes novell.com)
+ the module contributed (under a BSD license) to the main Ganglia
+ distribution by Brad Nicholes (bnicholes novell.com)
- the contents of the `io' directory are based on the
- module contributed to the Ganglia mailing list by JB Kim
- (jbremnant gmail.com) adapted to resemble the metric names
+ module contributed to the Ganglia mailing list (under a BSD license)
+ by JB Kim (jbremnant gmail.com) adapted to resemble the metric names
used in ganglia-modules-solaris
- the modules implement the Ganglia metric module interface.
Ganglia is distributed under a BSD-like license at http://ganglia.info
diff -Nru ganglia-modules-linux-1.3.4/debian/changelog ganglia-modules-linux-1.3.5/debian/changelog
--- ganglia-modules-linux-1.3.4/debian/changelog 2014-09-14 10:22:01.000000000 +0200
+++ ganglia-modules-linux-1.3.5/debian/changelog 2014-11-30 14:13:26.000000000 +0100
@@ -1,3 +1,11 @@
+ganglia-modules-linux (1.3.5-1) unstable; urgency=low
+
+ * New upstream release.
+ * Add a free space percentage metric.
+ * Fix truncation of name for root filesystem metric. (Closes: #771521)
+
+ -- Daniel Pocock <daniel@pocock.pro> Sun, 30 Nov 2014 14:04:33 +0100
+
ganglia-modules-linux (1.3.4-7) unstable; urgency=low
* Migrate from collab-maint to pkg-monitoring.
diff -Nru ganglia-modules-linux-1.3.4/depcomp ganglia-modules-linux-1.3.5/depcomp
diff -Nru ganglia-modules-linux-1.3.4/example/Makefile.in ganglia-modules-linux-1.3.5/example/Makefile.in
diff -Nru ganglia-modules-linux-1.3.4/fs/Makefile.in ganglia-modules-linux-1.3.5/fs/Makefile.in
diff -Nru ganglia-modules-linux-1.3.4/fs/mod_fs.c ganglia-modules-linux-1.3.5/fs/mod_fs.c
--- ganglia-modules-linux-1.3.4/fs/mod_fs.c 2012-03-11 08:15:45.000000000 +0100
+++ ganglia-modules-linux-1.3.5/fs/mod_fs.c 2014-11-30 13:57:39.000000000 +0100
@@ -128,6 +128,31 @@
}
+static g_val_t fs_free_func (fs_info_t *fs)
+{
+ g_val_t val;
+
+ struct statvfs svfs;
+ unsigned long blocksize;
+ fsblkcnt_t blocks_free;
+ fsblkcnt_t total_blocks;
+
+ val.f = (float) NAN;
+
+ if (statvfs(fs->mount_point, &svfs)) {
+ /* Ignore funky devices... */
+ err_msg("statvfs failed for %s: %s", fs->mount_point, strerror(errno));
+ return val;
+ }
+
+ total_blocks = svfs.f_blocks;
+ blocks_free = svfs.f_bfree;
+
+ val.f = (float)100.0 * blocks_free / total_blocks;
+ return val;
+
+}
+
typedef struct metric_spec {
fs_func_t fs_func;
const char *name;
@@ -137,11 +162,12 @@
} metric_spec_t;
-#define NUM_FS_METRICS 2
+#define NUM_FS_METRICS 3
metric_spec_t metrics[] = {
{ fs_capacity_bytes_func, "capacity_bytes", "bytes", "capacity in bytes", "%.0f" },
{ fs_used_bytes_func, "used_bytes", "bytes", "space used in bytes", "%.0f" },
+ { fs_free_func, "free_pct", "%", "percentage space free", "%.0f" },
{ NULL, NULL, NULL, NULL, NULL }
};
@@ -173,6 +199,10 @@
void set_ganglia_name(apr_pool_t *p, fs_info_t *fs) {
int i, j=0;
char c;
+ if(strcmp(fs->mount_point, "/") == 0) {
+ fs->ganglia_name = apr_pstrdup(p, "root");
+ return;
+ }
fs->ganglia_name = apr_pstrdup(p, fs->mount_point);
for (i = 0; fs->mount_point[i] != 0; i++) {
if(fs->mount_point[i] == '/') {
diff -Nru ganglia-modules-linux-1.3.4/install-sh ganglia-modules-linux-1.3.5/install-sh
diff -Nru ganglia-modules-linux-1.3.4/io/Makefile.in ganglia-modules-linux-1.3.5/io/Makefile.in
diff -Nru ganglia-modules-linux-1.3.4/io/mod_io.c ganglia-modules-linux-1.3.5/io/mod_io.c
--- ganglia-modules-linux-1.3.4/io/mod_io.c 2012-04-10 18:48:12.000000000 +0200
+++ ganglia-modules-linux-1.3.5/io/mod_io.c 2012-04-13 13:00:03.000000000 +0200
@@ -644,7 +644,6 @@
the metrics appear in the metric_info array
*/
switch (metric_index) {
-#ifdef LINUX
case 0:
return io_readtot_func();
case 1:
@@ -659,7 +658,6 @@
return io_queuemax_func();
case 6:
return io_busymax_func();
-#endif
default:
return val; /* default fallback */
}
@@ -668,7 +666,6 @@
static Ganglia_25metric iostat_metric_info[] =
{
-#ifdef LINUX
{0, "io_reads", 120, GANGLIA_VALUE_FLOAT, "reads/sec", "both", "%.2f",UDP_HEADER_SIZE+8, "total number of reads"},
{0, "io_nread", 120, GANGLIA_VALUE_FLOAT, "bytes/sec", "both", "%.1f",UDP_HEADER_SIZE+8, "total bytes read"},
{0, "io_writes", 120, GANGLIA_VALUE_FLOAT, "writes/sec", "both", "%.2f",UDP_HEADER_SIZE+8, "total number of writes"},
@@ -676,7 +673,6 @@
{0, "io_max_svc_time", 120, GANGLIA_VALUE_FLOAT, "s", "both", "%.6f",UDP_HEADER_SIZE+8, "max service time across disks"},
{0, "io_max_wait_time", 120, GANGLIA_VALUE_FLOAT, "s", "both", "%.6f",UDP_HEADER_SIZE+8, "max queue time across disks"},
{0, "io_busymax", 120, GANGLIA_VALUE_FLOAT, "%", "both", "%.3f",UDP_HEADER_SIZE+8, "max busy time across disks"},
-#endif
{0, NULL}
};
diff -Nru ganglia-modules-linux-1.3.4/ltmain.sh ganglia-modules-linux-1.3.5/ltmain.sh
diff -Nru ganglia-modules-linux-1.3.4/m4/libtool.m4 ganglia-modules-linux-1.3.5/m4/libtool.m4
diff -Nru ganglia-modules-linux-1.3.4/m4/lt~obsolete.m4 ganglia-modules-linux-1.3.5/m4/lt~obsolete.m4
diff -Nru ganglia-modules-linux-1.3.4/m4/ltoptions.m4 ganglia-modules-linux-1.3.5/m4/ltoptions.m4
diff -Nru ganglia-modules-linux-1.3.4/m4/ltversion.m4 ganglia-modules-linux-1.3.5/m4/ltversion.m4
diff -Nru ganglia-modules-linux-1.3.4/Makefile.in ganglia-modules-linux-1.3.5/Makefile.in
diff -Nru ganglia-modules-linux-1.3.4/missing ganglia-modules-linux-1.3.5/missing
diff -Nru ganglia-modules-linux-1.3.4/multicpu/Makefile.in ganglia-modules-linux-1.3.5/multicpu/Makefile.in
diff -Nru ganglia-modules-linux-1.3.4/README ganglia-modules-linux-1.3.5/README
--- ganglia-modules-linux-1.3.4/README 2012-03-11 08:15:45.000000000 +0100
+++ ganglia-modules-linux-1.3.5/README 2014-11-30 13:58:13.000000000 +0100
@@ -2,6 +2,9 @@
Changelog
=========
+v1.3.5: Add a free space metric.
+ Correct metric name for root filesystem.
+v1.3.4: Explicitly define some buffer sizes.
v1.3.3: Tweak README: requires ganglia headers > 3.3.1
v1.3.2: Adapt to use gm_file.h instead of local copies of Ganglia
helper functions (requires ganglia headers > 3.3.2)
Reply to: