|
@@ -0,0 +1,20 @@
|
|
1
|
+--- a/munin-node.in
|
|
2
|
++++ b/munin-node.in
|
|
3
|
+@@ -141,7 +141,7 @@
|
|
4
|
+ fi
|
|
5
|
+ }
|
|
6
|
+ fetch_if() {
|
|
7
|
+- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g')
|
|
8
|
++ IINFO=$(sed -ne "/^ *${1//_/-}: / { s/^.\+: \+//; s/[[:space:]]\+/ /gp }" /proc/net/dev)
|
|
9
|
+ echo "down.value" $(echo $IINFO | cut -d\ -f1)
|
|
10
|
+ echo "up.value" $(echo $IINFO | cut -d\ -f9)
|
|
11
|
+ }
|
|
12
|
+@@ -162,7 +162,7 @@
|
|
13
|
+ echo "trans.warning 1"
|
|
14
|
+ }
|
|
15
|
+ fetch_if_err() {
|
|
16
|
+- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g')
|
|
17
|
++ IINFO=$(sed -ne "/^ *${1//_/-}: / { s/^.\+: \+//; s/[[:space:]]\+/ /gp }" /proc/net/dev)
|
|
18
|
+ echo "rcvd.value" $(echo $IINFO | cut -d\ -f3)
|
|
19
|
+ echo "trans.value" $(echo $IINFO | cut -d\ -f11)
|
|
20
|
+ }
|