mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-24 18:07:20 +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
|
||||
|
||||
# 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)
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue