Forwarded from: http://bugs.debian.org/591455
Munin uses the following regexp to suggest device names from
/proc/net/dev:
/^ *(eth|tap|bond|wlan|ath|ra|sw|vlan|venet|veth|msh)[0-9]+(\.[0-9]+)?:/
The days of silly device names are over, as udev allows for easy and
consistent static renaming, and various user-space use freely-named
TUN devices (e.g. iodine, kvm, bluez, etc.).
Instead of the awk expression, might I suggest the following to
obtain the names of interfaces?
sed -rne 's,^[[:space:]]*([^:]+):.*,\1,p' /proc/net/dev
If you want to exclude certain interfaces, e.g. lo or sit*, then use this:
sed -rne '/^[[:space:]]*(lo|sit[[:digit:]]+):/d;s,^[[:space:]]*([^:]+):.*,\1,p' /proc/net/dev
Thanks,
Martin f krafft