mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Merge pull request #940 from RubenKelevra/add_systemd_net_for_tc
network.tc*: add the ability to detect systemd based network devices
This commit is contained in:
commit
f96bcb415a
@ -61,7 +61,7 @@ case "$1" in
|
|||||||
suggest)
|
suggest)
|
||||||
if [ -r /proc/net/dev ]; then
|
if [ -r /proc/net/dev ]; then
|
||||||
awk '
|
awk '
|
||||||
/^ *(eth|tap|bond|wlan|ath|ra|sw)[0-9]+:/ {
|
/^ *(eth|tap|bond|wlan|ath|ra|sw|eno|ens|enp|wlp|wl)[0-9]*/ {
|
||||||
split($0, a, /: */);
|
split($0, a, /: */);
|
||||||
gsub(/^ +/,"",a[1]);
|
gsub(/^ +/,"",a[1]);
|
||||||
if (($2 > 0) || ($10 > 0)) print a[1]; }' /proc/net/dev
|
if (($2 > 0) || ($10 > 0)) print a[1]; }' /proc/net/dev
|
||||||
|
@ -32,12 +32,10 @@ case $1 in
|
|||||||
suggest)
|
suggest)
|
||||||
if [ -r /proc/net/dev ]; then
|
if [ -r /proc/net/dev ]; then
|
||||||
awk '
|
awk '
|
||||||
/^ *(eth|tap|bond|wlan|ath|ra|sw)[0-9]+:/ {
|
/^ *(eth|tap|bond|wlan|ath|ra|sw|eno|ens|enp|wlp|wl)[0-9]*/ {
|
||||||
split($0, a, /: */);
|
split($0, a, /: */);
|
||||||
gsub(/^ +/,"",a[1]);
|
gsub(/^ +/,"",a[1]);
|
||||||
if (($2 > 0) || ($10 > 0)) print a[1]; }' /proc/net/dev
|
if (($2 > 0) || ($10 > 0)) print a[1]; }' /proc/net/dev
|
||||||
|
|
||||||
# egrep '^ *(eth|tap|bond|wlan|ath|ra|sw)[0-9]+:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'
|
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
@ -32,12 +32,10 @@ case $1 in
|
|||||||
suggest)
|
suggest)
|
||||||
if [ -r /proc/net/dev ]; then
|
if [ -r /proc/net/dev ]; then
|
||||||
awk '
|
awk '
|
||||||
/^ *(eth|tap|bond|wlan|ath|ra|sw)[0-9]+:/ {
|
/^ *(eth|tap|bond|wlan|ath|ra|sw|eno|ens|enp|wlp|wl)[0-9]*/ {
|
||||||
split($0, a, /: */);
|
split($0, a, /: */);
|
||||||
gsub(/^ +/,"",a[1]);
|
gsub(/^ +/,"",a[1]);
|
||||||
if (($2 > 0) || ($10 > 0)) print a[1]; }' /proc/net/dev
|
if (($2 > 0) || ($10 > 0)) print a[1]; }' /proc/net/dev
|
||||||
|
|
||||||
# egrep '^ *(eth|tap|bond|wlan|ath|ra|sw)[0-9]+:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'
|
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user