summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorspz <spz@pkgsrc.org>2014-09-21 14:49:45 +0000
committerspz <spz@pkgsrc.org>2014-09-21 14:49:45 +0000
commit0d4ec0f440396c4e667aff08de4839862d81fc0e (patch)
tree8ae2b8e03f87f8ed43cc779d1d4d97e614536901 /net
parentd2a80ee1b14d176d17ff050ac75f51d5c178c254 (diff)
downloadpkgsrc-0d4ec0f440396c4e667aff08de4839862d81fc0e.tar.gz
fix inode checks for NetBSD
fix inode check result rrd handling for all BSDish systems; if you use xymon-4.3.17nb1 on *BSD you may have lots of inode<number>.rrd files in /var/xymon/rrd, since it used iavail instead of the name of the filesystem mount to identify the inode usage stats.
Diffstat (limited to 'net')
-rw-r--r--net/xymon/Makefile4
-rw-r--r--net/xymon/distinfo5
-rw-r--r--net/xymon/patches/patch-xymond_client_netbsd.c4
-rw-r--r--net/xymon/patches/patch-xymond_rrd_do__disk.c23
4 files changed, 30 insertions, 6 deletions
diff --git a/net/xymon/Makefile b/net/xymon/Makefile
index 7db0d856f28..be0f2aa67cf 100644
--- a/net/xymon/Makefile
+++ b/net/xymon/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.40 2014/07/25 13:19:34 jperkin Exp $
+# $NetBSD: Makefile,v 1.41 2014/09/21 14:49:45 spz Exp $
#
DISTNAME= xymon-4.3.17
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xymon/}
diff --git a/net/xymon/distinfo b/net/xymon/distinfo
index 19d74065b14..8c8f3657f2a 100644
--- a/net/xymon/distinfo
+++ b/net/xymon/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2014/02/27 20:22:41 spz Exp $
+$NetBSD: distinfo,v 1.13 2014/09/21 14:49:45 spz Exp $
SHA1 (xymon-4.3.17.tar.gz) = 1a8ba9e42f27fe3ce4625be745a41bd16ed2d1f9
RMD160 (xymon-4.3.17.tar.gz) = 09b88d228633daa0f904567102a4c697b5651b73
@@ -15,5 +15,6 @@ SHA1 (patch-build_Makefile.Linux) = eea6d1ced23a622d115aa97dc10d352f9dd622b0
SHA1 (patch-build_rrd.sh) = cfafece75defb13b413917bfddedb41cb9bb3c8b
SHA1 (patch-build_snmp.sh) = 4141c6e2bebea078ac662b7585e579f2af8ee64f
SHA1 (patch-configure) = 7b71ed7a567124a2aa36d9bf9188209649e88a4d
-SHA1 (patch-xymond_client_netbsd.c) = 9f1c69d1c7c187c9221061df52569837add6070b
+SHA1 (patch-xymond_client_netbsd.c) = 9034777cbf12e3e168cf1598bfd444468e3a5086
+SHA1 (patch-xymond_rrd_do__disk.c) = e72cb0364e4e949e02a045da0abca46083624253
SHA1 (patch-xymond_rrd_do__vmstat.c) = 8062acc24e9b0e767c5abd3373641aa7b9a5b2ae
diff --git a/net/xymon/patches/patch-xymond_client_netbsd.c b/net/xymon/patches/patch-xymond_client_netbsd.c
index 744e8fb0c23..e7495236dcb 100644
--- a/net/xymon/patches/patch-xymond_client_netbsd.c
+++ b/net/xymon/patches/patch-xymond_client_netbsd.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-xymond_client_netbsd.c,v 1.1 2014/02/27 20:23:56 spz Exp $
+$NetBSD: patch-xymond_client_netbsd.c,v 1.2 2014/09/21 14:49:45 spz Exp $
--- xymond/client/netbsd.c.orig 2012-07-14 16:32:11.000000000 +0000
+++ xymond/client/netbsd.c
@@ -22,7 +22,7 @@ $NetBSD: patch-xymond_client_netbsd.c,v 1.1 2014/02/27 20:23:56 spz Exp $
unix_cpu_report(hostname, clienttype, os, hinfo, fromline, timestr, uptimestr, clockstr, msgcachestr,
whostr, 0, psstr, 0, topstr);
unix_disk_report(hostname, clienttype, os, hinfo, fromline, timestr, "Avail", "Capacity", "Mounted", dfstr);
-+ unix_inode_report(hostname, clienttype, os, hinfo, fromline, timestr, "ifree", "%iused", "Mounted", inodestr);
++ unix_inode_report(hostname, clienttype, os, hinfo, fromline, timestr, "iAvail", "%iCap", "Mounted", inodestr);
unix_procs_report(hostname, clienttype, os, hinfo, fromline, timestr, "COMMAND", NULL, psstr);
unix_ports_report(hostname, clienttype, os, hinfo, fromline, timestr, 3, 4, 5, portsstr);
diff --git a/net/xymon/patches/patch-xymond_rrd_do__disk.c b/net/xymon/patches/patch-xymond_rrd_do__disk.c
new file mode 100644
index 00000000000..cd7329fb4db
--- /dev/null
+++ b/net/xymon/patches/patch-xymond_rrd_do__disk.c
@@ -0,0 +1,23 @@
+$NetBSD: patch-xymond_rrd_do__disk.c,v 1.1 2014/09/21 14:49:45 spz Exp $
+
+BSDish systems' df -i retains the block stats, so you'd want 8, 7 and 5.
+Fortunately, counting from behind instead works out.
+This also fits AIX if you are using df -v.
+
+--- xymond/rrd/do_disk.c.orig 2012-07-13 14:05:20.000000000 +0000
++++ xymond/rrd/do_disk.c 2014-09-21 13:52:45.000000000 +0000
+@@ -139,10 +139,10 @@
+ aused = str2ll(columns[2], NULL);
+ break;
+ case DT_UNIX:
+- diskname = xstrdup(columns[5]);
+- p = strchr(columns[4], '%'); if (p) *p = ' ';
+- pused = atoi(columns[4]);
+- aused = str2ll(columns[2], NULL);
++ diskname = xstrdup(columns[columncount-1]);
++ p = strchr(columns[columncount-2], '%'); if (p) *p = ' ';
++ pused = atoi(columns[columncount-2]);
++ aused = str2ll(columns[columncount-4], NULL);
+ break;
+ case DT_NETAPP:
+ diskname = xstrdup(columns[1]);