|
@@ -5,7 +5,7 @@
|
5
|
5
|
}
|
6
|
6
|
fetch_if() {
|
7
|
7
|
- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g')
|
8
|
|
-+ IINFO=$(cat /proc/net/dev | sed -e 's/-/_/g' | grep "$1:" | cut -d: -f2 | sed -e 's/ */ /g' -e 's/^[ \t]*//')
|
|
8
|
++ IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ */ /g' -e 's/^[ \t]*//')
|
9
|
9
|
echo "down.value" $(echo $IINFO | cut -d\ -f1)
|
10
|
10
|
echo "up.value" $(echo $IINFO | cut -d\ -f9)
|
11
|
11
|
}
|
|
@@ -16,7 +16,7 @@
|
16
|
16
|
}
|
17
|
17
|
fetch_if_err() {
|
18
|
18
|
- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g')
|
19
|
|
-+ IINFO=$(cat /proc/net/dev | sed -e 's/-/_/g' | grep "$1:" | cut -d: -f2 | sed -e 's/ */ /g' -e 's/^[ \t]*//')
|
|
19
|
++ IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ */ /g' -e 's/^[ \t]*//')
|
20
|
20
|
echo "rcvd.value" $(echo $IINFO | cut -d\ -f3)
|
21
|
21
|
echo "trans.value" $(echo $IINFO | cut -d\ -f11)
|
22
|
22
|
}
|