[csw-devel] SF.net SVN: gar:[11055] csw/mgar/pkg/munin/trunk

j_arndt at users.sourceforge.net j_arndt at users.sourceforge.net
Sun Sep 26 19:38:06 CEST 2010


Revision: 11055
          http://gar.svn.sourceforge.net/gar/?rev=11055&view=rev
Author:   j_arndt
Date:     2010-09-26 17:38:06 +0000 (Sun, 26 Sep 2010)

Log Message:
-----------
munin: added support for Solaris 10 to network interface plugins

Modified Paths:
--------------
    csw/mgar/pkg/munin/trunk/Makefile
    csw/mgar/pkg/munin/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/munin/trunk/files/if.in.patch
    csw/mgar/pkg/munin/trunk/files/if_err.in.patch

Modified: csw/mgar/pkg/munin/trunk/Makefile
===================================================================
--- csw/mgar/pkg/munin/trunk/Makefile	2010-09-25 00:33:58 UTC (rev 11054)
+++ csw/mgar/pkg/munin/trunk/Makefile	2010-09-26 17:38:06 UTC (rev 11055)
@@ -29,6 +29,8 @@
 PATCHFILES += munin-htaccess.in.patch
 PATCHFILES += munin-graph.in.patch # match some paths to /{etc|var}/opt/csw/munin 
 PATCHFILES += perl.patch # shebang correctly set
+PATCHFILES += if.in.patch # added support for Solaris 10
+PATCHFILES += if_err.in.patch # added support for Solaris 10
 
 # We define upstream file regex so we can be notifed of new upstream software release
 UFILES_REGEX = -(\d+(?:\.\d+)*).tar.gz

Modified: csw/mgar/pkg/munin/trunk/checksums
===================================================================
--- csw/mgar/pkg/munin/trunk/checksums	2010-09-25 00:33:58 UTC (rev 11054)
+++ csw/mgar/pkg/munin/trunk/checksums	2010-09-26 17:38:06 UTC (rev 11055)
@@ -1,18 +1 @@
-58ab277c1a958459e5270da07f017fb3  CSWmunincommon.prototype
-390277cc59e2c37d5b0bd4f2c3441996  CSWmuninmaster.postinstall
-35853c8c9bd199828b58b668e2056025  CSWmuninmaster.prototype
-c4064b92df7835bf37b18e799aa6177e  CSWmuninnode.prototype
-e777f0ddea3e09d0faf72780ad782995  Makefile.config.patch
-1e3c461f2beafce43d6b94f3af478e5e  Makefile.patch
-e6bafa4aa3cba7fc16e444ad168b4cd1  README.CSW
-59409f4b412953283c3df4546fd4886c  apache-munin-cgi.conf.CSW
-e701d132ba0b6f3dcc90190860f5aa6b  apache-munin.conf.CSW
-2e0173bf615787eaf37e551b956dc9b8  cswmuninnode
-50fa4a545f878d79e219891c6ac8d2d2  cswusergroup
 4ae84b9a27b686c3819d8d7b51d8cb4c  munin-1.4.5.tar.gz
-1a13b606a5c82958ed8e9bf139044988  munin-graph.in.patch
-e96eab2e321a33517d88dfbe1d510211  munin-htaccess.in.patch
-05a23869a8c0e637a423c2559c150b4f  munin-node.conf.in.patch
-e9d94e230c8719c5d7d3fe624e87bea2  munin.conf.in.patch
-c0e9f043fe5ea79a1fc7dfc91f09a961  perl.patch
-5673776262a0d1b2c386f45f0fd6a783  sunos_memory.in.patch

Added: csw/mgar/pkg/munin/trunk/files/if.in.patch
===================================================================
--- csw/mgar/pkg/munin/trunk/files/if.in.patch	                        (rev 0)
+++ csw/mgar/pkg/munin/trunk/files/if.in.patch	2010-09-26 17:38:06 UTC (rev 11055)
@@ -0,0 +1,98 @@
+From 4394dc4c0af55d1ed7a57413572f79ec40bdf2cd Mon Sep 17 00:00:00 2001
+From: Juergen Arndt <ja at opencsw.org>
+Date: Sun, 26 Sep 2010 18:30:48 +0200
+Subject: [PATCH] added support for Solaris 10 and earlier
+
+---
+ plugins/node.d.sunos/if_.in |   57 +++++++++++++++++++++++++++----------------
+ 1 files changed, 36 insertions(+), 21 deletions(-)
+
+diff --git a/plugins/node.d.sunos/if_.in b/plugins/node.d.sunos/if_.in
+index d72a539..273b597 100755
+--- a/plugins/node.d.sunos/if_.in
++++ b/plugins/node.d.sunos/if_.in
+@@ -42,6 +42,7 @@ Unknown license
+ 
+ . $MUNIN_LIBDIR/plugins/plugin.sh
+ 
++SOLVERSION=`uname -r | awk -F. '{print $2}`
+ INTERFACE=${0##*/if_}
+ 
+ if [ "$1" = "autoconf" ]; then
+@@ -56,7 +57,11 @@ fi
+ 
+ if [ "$1" = "suggest" ]; then
+ 	if [ -x /usr/bin/kstat ]; then
+-		kstat -m link -p -s '/^rbytes$/' | awk -F: '{ print $3 }'
++		if [ $SOLVERSION -le 10 ]; then
++			kstat -p -s '/^rbytes64$/' | awk -F: '{ print $3 }'
++		elif [ $SOLVERSION -gt 10 ]; then
++			kstat -m link -p -s '/^rbytes64$/' | awk -F: '{ print $3 }'
++		fi
+ 		exit 0
+ 	else
+ 		exit 1
+@@ -65,30 +70,40 @@ fi
+ 
+ if [ "$1" = "config" ]; then
+ 
+-	echo "graph_order rbytes obytes" 
++	echo "graph_order rbytes64 obytes64" 
+ 	echo "graph_title $INTERFACE traffic"
+ 	echo 'graph_args --base 1000'
+ 	echo 'graph_vlabel bits per ${graph_period} in (-) / out (+)'
+ 	echo 'graph_category network'
+-	echo 'rbytes.label received'
+-        echo 'rbytes.type COUNTER'
+-        echo 'rbytes.max 2000000000'
+-        echo 'rbytes.graph no'
+-        echo 'rbytes.cdef rbytes,8,*'
+-	print_warning rbytes
+-	print_critical rbytes
+-        echo 'obytes.label bps'
+-	echo 'obytes.type COUNTER'
+-	echo 'obytes.negative rbytes'
+-	echo 'obytes.cdef obytes,8,*'
+-        echo 'obytes.max 2000000000'
+-	print_warning obytes
+-	print_critical obytes
++	echo 'rbytes64.label received'
++        echo 'rbytes64.type COUNTER'
++        echo 'rbytes64.max 2000000000'
++        echo 'rbytes64.graph no'
++        echo 'rbytes64.cdef rbytes64,8,*'
++	print_warning rbytes64
++	print_critical rbytes64
++        echo 'obytes64.label bps'
++	echo 'obytes64.type COUNTER'
++	echo 'obytes64.negative rbytes64'
++	echo 'obytes64.cdef obytes64,8,*'
++        echo 'obytes64.max 2000000000'
++	print_warning obytes64
++	print_critical obytes64
+ 	exit 0
+ fi;
+ 
+-kstat -p -n $INTERFACE -m link -s '/^[ro]bytes$/' | awk -F: '
+-{
+-	split($4, four, "\t")
+-	print four[1] ".value", four[2]
+-}'
++if [ $SOLVERSION -le 10 ]       # Solaris 10 and earlier
++then
++        kstat -p -n $INTERFACE -s '/^[ro]bytes64$/' | awk -F: '
++        {
++                split($4, four, "\t")
++                print four[1] ".value", four[2]
++        }'
++elif [ $SOLVERSION -gt 10 ]     # Solaris 11 or OpenSolaris / OpenIndiana or later
++then
++        kstat -p -n $INTERFACE -m link -s '/^[ro]bytes64$/' | awk -F: '
++        {
++                split($4, four, "\t")
++                print four[1] ".value", four[2]
++        }'
++fi
+-- 
+1.7.2.2
+

Added: csw/mgar/pkg/munin/trunk/files/if_err.in.patch
===================================================================
--- csw/mgar/pkg/munin/trunk/files/if_err.in.patch	                        (rev 0)
+++ csw/mgar/pkg/munin/trunk/files/if_err.in.patch	2010-09-26 17:38:06 UTC (rev 11055)
@@ -0,0 +1,61 @@
+From 74d1fa95cd376e87824fd1bca3cad196adeabf1f Mon Sep 17 00:00:00 2001
+From: Juergen Arndt <ja at opencsw.org>
+Date: Sun, 26 Sep 2010 17:15:57 +0200
+Subject: [PATCH] added support for Solaris 10
+
+---
+ plugins/node.d.sunos/if_err_.in |   27 +++++++++++++++++++++------
+ 1 files changed, 21 insertions(+), 6 deletions(-)
+
+diff --git a/plugins/node.d.sunos/if_err_.in b/plugins/node.d.sunos/if_err_.in
+index 097ec1c..269e9d3 100755
+--- a/plugins/node.d.sunos/if_err_.in
++++ b/plugins/node.d.sunos/if_err_.in
+@@ -42,6 +42,7 @@ Unknown license
+ 
+ . $MUNIN_LIBDIR/plugins/plugin.sh
+ 
++SOLVERSION=`uname -r | awk -F. '{print $2}`
+ INTERFACE=${0##*/if_err_}
+ 
+ if [ "$1" = "autoconf" ]; then
+@@ -56,7 +57,11 @@ fi
+ 
+ if [ "$1" = "suggest" ]; then
+ 	if [ -x /usr/bin/kstat ]; then
+-		kstat -m link -p -s '/^ierrors$/' | awk -F: '{ print $3 }'
++		if [ $SOLVERSION -le 10 ]; then
++			kstat -p -s '/^ierrors$/' | awk -F: '{ print $3 }'
++		elif [ $SOLVERSION -gt 10 ]; then
++			kstat -m link -p -s '/^ierrors$/' | awk -F: '{ print $3 }'
++		fi
+ 		exit 0
+ 	else
+ 		exit 1
+@@ -88,8 +93,18 @@ if [ "$1" = "config" ]; then
+ 	exit 0
+ fi;
+ 
+-kstat -p -n $INTERFACE -m link -s '/^([io]errors|collisions)$/' | awk -F: '
+-{
+-	split($4, four, "\t")
+-	print four[1] ".value", four[2]
+-}'
++if [ $SOLVERSION -le 10 ]       # Solaris 10 and earlier
++then
++	kstat -p -n $INTERFACE -s '/^([io]errors|collisions)$/' | awk -F: '
++	{
++		split($4, four, "\t")
++		print four[1] ".value", four[2]
++	}'
++elif [ $SOLVERSION -eq 11 ]     # later than Solaris 10
++then
++	kstat -p -n $INTERFACE -m link -s '/^([io]errors|collisions)$/' | awk -F: '
++	{
++		split($4, four, "\t")
++		print four[1] ".value", four[2]
++	}'
++fi
+-- 
+1.7.2.2
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list