wifimon
It is a bash script that works in text mode and writes on the screen basic parameters of
all wifi cards in the system if these cards are in Managed or Master mode and if
hostap or madwifi driver is used.
Dependencies : bash, hostap or madwifi, iwconfig
How to get last version from svn: svn co svn://websvn.jablonka.cz/repos/wifimon/trunk wifimon
http://websvn.jablonka.cz/listing.php?repname=wifimon&path=%2Ftrunk%2F#path_trunk_
Verze : 29/3/2009
- parsing output from "iwlist athX scan" directly or from a file.
wifimon -scan
wifimon -scanfromfile scan_name.txt
Lists frequence, quality (signal - noise), MAC and essid.
Version : 12/9/2005 download wifimon 0.5.5
Version : 13/6/2005 download wifimon 0.5.4
Version : 12/6/2005 download wifimon 0.5.3
- fixed client signal strength
- dhcp leases name extraction fixed
Version : 8/4/2004 download wifimon 0.5.2
- -macoff MAC adresses will not be printed out
- -rxtxoff RX and TX packets will not be printed out (writen by Tydyt)
- -threeline makes client data printed over three lines (writen by Tydyt)
- parameter -col makes -html output colored (writen by Tydyt)
Version : 5/10/2003 download wifimon 0.5.0
- instead of "tput cup 0 0" and "clear" are used escape characters
Version : 5/10/2003 download wifimon 0.4.9
- all external programs are detected automaticly. Programs iwconfig, ifconfig, awk, tput, clear and
configs of dhcpd
- dhcpd.conf format can be in both oneline and multiline (tydyt's code) fashion
- parameter -once do not clear screen anymore
Version : 14/8/2003 download wifimon 0.4beta8
- -ppkts lists percentage ratio of 1M, 2M, 5.5M a 11M packets for clients
- -pkts lists number of 1M, 2M, 5.5M a 11M packets for clients
- -once with -html drives refresh tag in page header
Version : 4/8/2003 download wifimon 0.4beta7 from Covex
- iwconfig is detected automaticly
- if tput is not detected then clear is used
Version : 1/8/2003 download wifimon 0.4beta6
- A client signal strenght on observed AP is enumerated as a difference (signal-silence) and it
works with the new versions of hostap. The result can be negative as well.
- added a variable for dhcpd.conf
- all the stuff around colors is used only when necessary
- variables for signal strenght bar have been added
Version : 16/6/2003 download (this version comes from
10/3/2003 version. I'm planning to implement just wds stuff from tydyt version)
- Filtered out all error messages when there is a missmatch in the versions between hostap and wireless tools
- during html output is not sent clear
- wl_header_static removed
- parameter -v shows a version
Version : 22/4/2003 download sent by Tydyt
Version : 10/3/2003 download
- if dhcp.conf is in the next format then the name is printed:
host kaspi { hardware ethernet 00:60:B3:6A:73:7D; fixed-address 10.10.122.9; }
host mac { hardware ethernet 00:60:B3:6A:5D:18; fixed-address 10.10.122.10; }
- printed cards in Ad-Hoc mode
Version : 10/2/2003 download
- removed double blinking after startup
- removed (allmost) all "ugly elements" in the output when used with cgi script
Version : 23/1/2003 download
- parameter -once replaced -1
- parameter -oneline lists client on one line only
- parameters can be stated in any order and in case of iface names in any amount
- order and amount of listed ifaces can be defined in any manner
- parameter -html produces output in simple html format
- parameter -htm1 removed (no it is not a mistake - there is number one "1" and not the character "l")
Version : 6/1/2003 download
- parameter -col makes terminal output nicer
Version : 2/1/2003 download
- parameter -help
- parameter -htm generates html output into the file /tmp/wifimo.htm
- parameter -htm1 just one html page generated
- ip addresses visible (thnx to Fyzik)
Initial Version : 0.1 29/12/2002 download
License : GPL
Instalation : cp wifimon /usr/local/bin ; chmod 555 /usr/local/bin/wifimon
Usage examples :
wifimon -help
wifimon -once -col
wifimon -col -wlan2
wifimon -col -oneline
wifimon -col -wlan2 -wlan0 -oneline -wlan1
and so on ...
CGI script : download
A simple example of using wifimon by a cgi script.
Screenshots :
FAQ
> 1. I've read that iwlist interface peers is going to be replaced by
> "iwlist interface scan" in a future and that
> /proc/sys/net/wlan0/associated_sta is going to have the same information
> that "iwlist interface scan", is that right?. Which option would you
> choose to get clients from each interface?
I've used iwlist iface peers and I've no idea what will be
Once they will replace it I'll decide to use scan - but for now I use peers
> 2. Do you consider it's better to use /proc file information or command
> information to manage wireless network cards?.
I've used for some tests /proc info because I feel it more independent from
other commands
> 3. Do you know athstats command?, I don't understand very well the
> information that this command gives and because of that I would like to
> ask you about it?.
I've never used athstats for any info so I don't know.
> 4. Why do you use /proc/net/wireless to get quality, signal and noise
> level?, why don't you use iwconfig to get those parameters?.
for hostap driver, that was the main driver used by wifimon, client
noise and signal levels were only in /proc/net/wireless
iwconfig shown some constant values that time
> 5. Do you know a way to get information of each atheros wireless network
> card client?
just from /proc/net/wireless
no other way is known to me (maybe there is some)
> 6. Is there a command to get the information of each prism wireless network
> card client?.
just from /proc/net/wireless
no other way is known to me (maybe there is some)
> 7. In w_pkts() what is $wl_pksize for?
wl_pksize is the "maximum number - 1" that can be shown in percentage of packets
when -ppkts param is used
it results in next cases
0 - no packet found at this bitrate
1..99 - one or more packet found (99 is the maximum)
as you can see there is no 100% value and the reason is in the fact 100% is three
digit number and it looks better aligned when only two digit numbers are used
> All that you said to me is very useful, thanks for your time, I just
> have a last question about w_pkts, why do you do $wl_nt + 1 to get the
> result of each kind of packet?.
wait a moment
you probably missed the meaning of bash formulas
"+" operator is used as the last one and it means there is no "$wl_nt + 1"
there is
wl_nt1n=$(($wl_pksize * $wl_nt1 / $wl_nt + 1))
that is handled like
wl_nt1n=$((($wl_pksize * $wl_nt1 / $wl_nt) + 1))
it results in a number 1..99 - one or more packet found (99 is the maximum)