Skip to content

Commit

Permalink
node.d.linux/if_: suggest interfaces not ending in a digit
Browse files Browse the repository at this point in the history
Closes #943.
  • Loading branch information
kenyon committed Mar 5, 2012
1 parent b5bfc55 commit ac8c868
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions plugins/node.d.linux/if_.in
Expand Up @@ -155,11 +155,7 @@ case $1 in
;;
suggest)
if [[ -r /proc/net/dev ]]; then
awk '
/^ *(eth|tap|bond|wlan|ath|ra|sw|vlan|venet|veth|msh)[0-9]+(\.[0-9]+)?:/ {
split($0, a, /: */);
gsub(/^ +/,"",a[1]);
if (($2 > 0) || ($10 > 0)) print a[1]; }' /proc/net/dev
sed -rne '/^[[:space:]]*(lo|sit[[:digit:]]+):/d;s,^[[:space:]]*([^:]+):.*,\1,p' /proc/net/dev
fi
exit 0
;;
Expand Down

0 comments on commit ac8c868

Please sign in to comment.