mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-26 10:58:12 +00:00
Output fields of tc can vary, possibly causing corrupted data to be gathered.
Look specifically for the "bytes" keyword
This commit is contained in:
parent
234a753fea
commit
3dd825dd62
1 changed files with 8 additions and 2 deletions
|
@ -68,9 +68,15 @@ case $1 in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# the root(s)
|
# the root(s)
|
||||||
mytc $DEVICE | grep -v " parent " | awk "{ print \$2 \"_\" \$3 \".value \" \$14}"
|
mytc $DEVICE | grep -v " parent " | awk '{
|
||||||
|
split(substr($0, match($0, /[0-9]+ [Bb]ytes/)), a, " ");
|
||||||
|
print $2 "_" $3 ".value " a[1];
|
||||||
|
}'
|
||||||
|
|
||||||
# the child(s)
|
# the child(s)
|
||||||
mytc $DEVICE | grep " parent " | awk "{ print \$2 \"_\" \$3 \".value \" \$19}"
|
mytc $DEVICE | grep " parent " | awk '{
|
||||||
|
split(substr($0, match($0, /[0-9]+ [Bb]ytes/)), a, " ");
|
||||||
|
print $2 "_" $3 ".value " a[1];
|
||||||
|
}'
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue