GITOLITE.txt
[somenet/munin.git] / hostap
diff --git a/hostap b/hostap
index c504770f427e742ea419315b5484422c3334518d..b2187cba8cfb3f42f3b07d60f2d9a824a8bc6df3 100755 (executable)
--- a/hostap
+++ b/hostap
@@ -1,4 +1,20 @@
 #!/bin/sh
+#
+# Copyright 2011 by Jan Vales <jan@jvales.net> (Someone <someone@somenet.org>)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
 
 if [ "$1" = "autoconf" ]; then
         echo "yes"
@@ -9,7 +25,7 @@ if [ "$1" = "config" ]; then
     echo "graph_title Hostapd status"
     echo "graph_info This graph shows the status of stations connected to the wlan."
     echo "graph_category hostapd"
-    echo "graph_order numsta numstanonerp numstanoshortslottime numstanoshortpreamble cauth cassoc cauthorized"
+#    echo "graph_order numsta numstanonerp numstanoshortslottime numstanoshortpreamble cauth cassoc cauthorized cshopre cwmm"
     echo "graph_printf %.0lf"
     echo "graph_scale no"
     echo "graph_args -l 0"
@@ -21,12 +37,38 @@ if [ "$1" = "config" ]; then
     echo "numstanoshortslottime.draw LINE2"
     echo "numstanoshortpreamble.label Non-short-preamble stations"
     echo "numstanoshortpreamble.draw LINE2"
-    echo "cauth.label Clients auth"
+    echo "cauth.label Clients AUTH"
     echo "cauth.draw LINE2"
-    echo "cassoc.label Clients assoc"
+    echo "cassoc.label Clients ASSOC"
     echo "cassoc.draw LINE2"
-    echo "cauthorized.label Clients authorized"
+    echo "cauthorized.label Clients AUTHORIZED"
     echo "cauthorized.draw LINE2"
+    echo "cshopre.label Clients SHORT_PREAMBLE"
+    echo "cshopre.draw LINE2"
+    echo "cwmm.label Clients WMM"
+    echo "cwmm.draw LINE2"
+    echo "cps.label Clients PS"
+    echo "cps.draw LINE2"
+    echo "ctim.label Clients TIM"
+    echo "ctim.draw LINE2"
+    echo "cperm.label Clients PERM"
+    echo "cperm.draw LINE2"
+    echo "cwds.label Clients WDS"
+    echo "cwds.draw LINE2"
+    echo "cwps.label Clients WPS"
+    echo "cwps.draw LINE2"
+    echo "cwps2.label Clients WPS2"
+    echo "cwps2.draw LINE2"
+    echo "cpp.label Clients PENDING_POLL"
+    echo "cpp.draw LINE2"
+    echo "cmfp.label Clients MFP"
+    echo "cmfp.draw LINE2"
+    echo "cmwps.label Clients MAYBE_WPS"
+    echo "cmwps.draw LINE2"
+    echo "cpreauth.label Clients PREAUTH"
+    echo "cpreauth.draw LINE2"
+    echo "cnonerp.label Clients NonERP"
+    echo "cnonero.draw LINE2"
     exit 0
 fi
 
@@ -36,5 +78,19 @@ head -n3 /tmp/hostapd.dump | tail -n2 | sed -e 's/ /\n/g' -e 's/_//g' -e 's/=/.v
 echo "cauth.value $(grep '\[AUTH\]' /tmp/hostapd.dump | wc -l)"
 echo "cassoc.value $(grep '\[ASSOC\]' /tmp/hostapd.dump | wc -l)"
 echo "cauthorized.value $(grep '\[AUTHORIZED\]' /tmp/hostapd.dump | wc -l)"
+echo "cshopre.value $(grep '\[SHORT_PREAMBLE\]' /tmp/hostapd.dump | wc -l)"
+echo "cwmm.value $(grep '\[WMM\]' /tmp/hostapd.dump | wc -l)"
+echo "cps.value $(grep '\[PS\]' /tmp/hostapd.dump | wc -l)"
+echo "ctim.value $(grep '\[TIM\]' /tmp/hostapd.dump | wc -l)"
+echo "cperm.value $(grep '\[PERM\]' /tmp/hostapd.dump | wc -l)"
+echo "cwps.value $(grep '\[WPS\]' /tmp/hostapd.dump | wc -l)"
+echo "cwps2.value $(grep '\[WPS2\]' /tmp/hostapd.dump | wc -l)"
+echo "cwds.value $(grep '\[WDS\]' /tmp/hostapd.dump | wc -l)"
+echo "cpp.value $(grep '\[PENDING_POLL\]' /tmp/hostapd.dump | wc -l)"
+echo "cmfp.value $(grep '\[MFP\]' /tmp/hostapd.dump | wc -l)"
+echo "cmwps.value $(grep '\[MAYBE_WPS\]' /tmp/hostapd.dump | wc -l)"
+echo "cpreauth.value $(grep '\[PREAUTH\]' /tmp/hostapd.dump | wc -l)"
+echo "cnonerp.value $(grep '\[NonERP\]' /tmp/hostapd.dump | wc -l)"
 
 exit 0
+