plugin-network_wireless: linkquality

File linkquality, 1.5 kB (added by matteo.zandi@gmail.com, 6 years ago)
Line 
1 #!/bin/sh
2
3 case $1 in
4    config)
5         cat <<'EOM'
6 graph_title Wireless Link Quality
7 #graph_vlabel Link quality (/100) - Signal/Noise levels
8
9 quality.label quality
10 signal.label signal
11 noise.label noise
12 rate.label rate
13 power.label power
14 sens.label sens
15
16 graph_args --base 1000 -l 0
17 graph_scale no
18 graph_category network
19 quality.warning 5:
20 quality.critical 1:
21
22 graph_info Link quality of the wireless network connection and signal/noise levels
23
24 quality.info Average link quality for the five minutes.
25 signal.info Average signal level for the five minutes.
26 noise.info Average signal level for the five minutes.
27 rate.info Average bit rate for the five minutes
28 power.info Average transmit power for the five minutes
29 sens.info Average sensitivity for the five minutes
30
31 EOM
32         exit 0;;
33 esac
34
35 echo -n "quality.value "
36 iwconfig ath0 | grep Quality | awk 'BEGIN { FS = "=[ \t]*|/[ \t]*|[ \t]+" } { print $4 }'
37 echo -n "signal.value "
38 iwconfig ath0 | grep Quality | awk 'BEGIN { FS = "=[ \t]*|/[ \t]*|[ \t]+" } { print $8 }'
39 echo -n "noise.value "
40 iwconfig ath0 | grep Quality | awk 'BEGIN { FS = "=[ \t]*|/[ \t]*|[ \t]+" } { print $12 }'
41 echo -n "rate.value "
42 iwconfig ath0 | grep Sensitivity | awk 'BEGIN { FS = "=[ \t]*|/[ \t]*|:[ \t]*|[ \t]+" } { print $4 }'
43 echo -n "power.value "
44 iwconfig ath0 | grep Sensitivity | awk 'BEGIN { FS = "=[ \t]*|/[ \t]*|:[ \t]*|[ \t]+" } { print $8 }'
45 echo -n "sens.value "
46 iwconfig ath0 | grep Sensitivity | awk 'BEGIN { FS = "=[ \t]*|/[ \t]*|:[ \t]*|[ \t]+" } { print $11 }'