From c3a6bf4d8db6ca74a851b392c80d1aa76a194815 Mon Sep 17 00:00:00 2001 From: Albert Stefanov Date: Sat, 28 Oct 2023 19:38:39 +0300 Subject: [PATCH] bugfix --- .../wifi_intefaces/agents/linux/plugins/wifi_interfaces | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/cmk-plugins/wifi_intefaces/agents/linux/plugins/wifi_interfaces b/tools/cmk-plugins/wifi_intefaces/agents/linux/plugins/wifi_interfaces index f214719..1f2804a 100755 --- a/tools/cmk-plugins/wifi_intefaces/agents/linux/plugins/wifi_interfaces +++ b/tools/cmk-plugins/wifi_intefaces/agents/linux/plugins/wifi_interfaces @@ -26,7 +26,9 @@ do # The noise is represented as an unsigned byte, we need a signed one. Thus, we subtract 2**7. noise="$(expr $(echo "$output" | awk -F ': ' '/noise:/{ print $2 }') - 256)" - client_count="$(iw dev $interface station dump | wc -l)" + + phy="$(echo "$interface" | awk -F '-' '//{print $1 }')" + client_count="$(ls /sys/kernel/debug/ieee80211/$phy/netdev:$interface/stations/ | wc -l)" # We calculate the deltas to use for alarms locally; fields are u64 delta_ch_time=$(expr $(expr $ch_time - $ch_time_old) % 18446744073709551616)