pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/xymon fix inode checks for NetBSD



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e99b93cbf7d0
branches:  trunk
changeset: 639661:e99b93cbf7d0
user:      spz <spz%pkgsrc.org@localhost>
date:      Sun Sep 21 14:49:45 2014 +0000

description:
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:

 net/xymon/Makefile                             |   4 ++--
 net/xymon/distinfo                             |   5 +++--
 net/xymon/patches/patch-xymond_client_netbsd.c |   4 ++--
 net/xymon/patches/patch-xymond_rrd_do__disk.c  |  23 +++++++++++++++++++++++
 4 files changed, 30 insertions(+), 6 deletions(-)

diffs (76 lines):

diff -r d0ba2690207d -r e99b93cbf7d0 net/xymon/Makefile
--- a/net/xymon/Makefile        Sun Sep 21 11:20:19 2014 +0000
+++ b/net/xymon/Makefile        Sun Sep 21 14:49:45 2014 +0000
@@ -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 -r d0ba2690207d -r e99b93cbf7d0 net/xymon/distinfo
--- a/net/xymon/distinfo        Sun Sep 21 11:20:19 2014 +0000
+++ b/net/xymon/distinfo        Sun Sep 21 14:49:45 2014 +0000
@@ -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_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 -r d0ba2690207d -r e99b93cbf7d0 net/xymon/patches/patch-xymond_client_netbsd.c
--- a/net/xymon/patches/patch-xymond_client_netbsd.c    Sun Sep 21 11:20:19 2014 +0000
+++ b/net/xymon/patches/patch-xymond_client_netbsd.c    Sun Sep 21 14:49:45 2014 +0000
@@ -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 @@
        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 -r d0ba2690207d -r e99b93cbf7d0 net/xymon/patches/patch-xymond_rrd_do__disk.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/xymon/patches/patch-xymond_rrd_do__disk.c     Sun Sep 21 14:49:45 2014 +0000
@@ -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]);



Home | Main Index | Thread Index | Old Index