Hi,
the plugin if_err_ does not produce any output on Solaris 10 or earlier. Reason is the option "-m link" for the kstat command. The module "link" exists only in OpenSolaris? but not in Solaris (see Ticket #820).
I attached a patch, which should work on both Solaris and OpenSolaris?:
--- munin-1.4.4.orig/plugins/node.d.sunos/if_err_.in 2010-02-26 13:32:44.000000000 +0100
+++ munin-1.4.4/plugins/node.d.sunos/if_err_.in 2010-03-13 18:08:35.844764023 +0100
@@ -42,6 +42,7 @@
. $MUNIN_LIBDIR/plugins/plugin.sh
+SOLVERSION=`uname -r | awk -F. '{print $2}`
INTERFACE=${0##*/if_err_}
if [ "$1" = "autoconf" ]; then
@@ -56,7 +57,11 @@
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 -eq 11 ]; then
+ kstat -m link -p -s '/^ierrors$/' | awk -F: '{ print $3 }'
+ fi
exit 0
else
exit 1
@@ -88,8 +93,18 @@
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 ] # OpenSolaris
+then
+ kstat -p -n $INTERFACE -m link -s '/^([io]errors|collisions)$/' | awk -F: '
+ {
+ split($4, four, "\t")
+ print four[1] ".value", four[2]
+ }'
+fi
Please verify it.
Thanks, Juergen