3 if [ "$1" = "autoconf" ]; then
8 if [ "$1" = "config" ]; then
9 echo "graph_title Hostapd status"
10 echo "graph_info This graph shows the status of stations connected to the wlan."
11 echo "graph_category hostapd"
12 echo "graph_order numsta numstanonerp numstanoshortslottime numstanoshortpreamble cauth cassoc cauthorized cshopre cwmm"
13 echo "graph_printf %.0lf"
15 echo "graph_args -l 0"
16 echo "numsta.label Number of all stations"
17 echo "numsta.draw LINE2"
18 echo "numstanonerp.label Non-erp stations"
19 echo "numstanonerp.draw LINE2"
20 echo "numstanoshortslottime.label Non-short-slot-time stations"
21 echo "numstanoshortslottime.draw LINE2"
22 echo "numstanoshortpreamble.label Non-short-preamble stations"
23 echo "numstanoshortpreamble.draw LINE2"
24 echo "cauth.label Clients auth"
25 echo "cauth.draw LINE2"
26 echo "cassoc.label Clients assoc"
27 echo "cassoc.draw LINE2"
28 echo "cauthorized.label Clients authorized"
29 echo "cauthorized.draw LINE2"
30 echo "cshopre.label Clients SHORT_PREAMBLE"
31 echo "cshopre.draw LINE2"
32 echo "cwmm.label Clients wmm"
33 echo "cwmm.draw LINE2"
37 killall -SIGUSR1 hostapd &> /dev/null
39 head -n3 /tmp/hostapd.dump | tail -n2 | sed -e 's/ /\n/g' -e 's/_//g' -e 's/=/.value /g'
40 echo "cauth.value $(grep '\[AUTH\]' /tmp/hostapd.dump | wc -l)"
41 echo "cassoc.value $(grep '\[ASSOC\]' /tmp/hostapd.dump | wc -l)"
42 echo "cauthorized.value $(grep '\[AUTHORIZED\]' /tmp/hostapd.dump | wc -l)"
43 echo "cshopre.value $(grep '\[SHORT_PREAMBLE\]' /tmp/hostapd.dump | wc -l)"
44 echo "cwmm.value $(grep '\[WMM\]' /tmp/hostapd.dump | wc -l)"