Révision f3347821
network.tc*: add the ability to detect systemd based network device names
| plugins/network/tc_packets_ | ||
|---|---|---|
| 32 | 32 |
suggest) |
| 33 | 33 |
if [ -r /proc/net/dev ]; then |
| 34 | 34 |
awk ' |
| 35 |
/^ *(eth|tap|bond|wlan|ath|ra|sw)[0-9]+:/ {
|
|
| 35 |
/^ *(eth|tap|bond|wlan|ath|ra|sw|eno|ens|enp|wlp|wl)[0-9]*/ {
|
|
| 36 | 36 |
split($0, a, /: */); |
| 37 | 37 |
gsub(/^ +/,"",a[1]); |
| 38 | 38 |
if (($2 > 0) || ($10 > 0)) print a[1]; }' /proc/net/dev |
| 39 |
|
|
| 40 |
# egrep '^ *(eth|tap|bond|wlan|ath|ra|sw)[0-9]+:' /proc/net/dev | cut -f1 -d: | sed 's/ //g' |
|
| 41 | 39 |
fi |
| 42 | 40 |
exit 0 |
| 43 | 41 |
;; |
Formats disponibles : Unified diff