…
Code:% which wlandebug /usr/sbin/wlandebug % man 8 wlandebug %
wlandebug(8)
– I don't how to use the command. …
wlandebug
can be used to monitor signal strength, I don't know.% man wlanstats
No manual entry for wlanstats
% which wlanstats
/usr/local/bin/wlanstats
% file /usr/local/bin/wlanstats
/usr/local/bin/wlanstats: ELF 64-bit LSB pie executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 14.0 (1400045), FreeBSD-style, stripped
% wlanstats -h
wlanstats: [-ah] [-i ifname] [-l] [-m station MAC address] [-o fmt] [interval]
% wlanstats help
input mgmt output rxkid ascan bgscn bmiss rssi noise rate
6750 88489 36 0 2 0 0 20.5 -87 135.0M
3 10 0 0 0 0 0 21.0 -88 135.0M
0 10 0 0 0 0 0 20.5 -88 135.0M
1 10 0 0 0 0 0 20.5 -88 135.0M
1 9 0 0 0 0 0 21.0 -88 135.0M
1 10 0 0 0 0 0 20.5 -88 135.0M
0 10 0 0 0 0 0 20.5 -89 135.0M
1 10 0 0 0 0 0 21.0 -88 135.0M
0 10 0 0 0 0 0 20.5 -88 135.0M
1 9 0 0 0 0 0 20.5 -89 135.0M
0 10 0 0 0 0 0 20.5 -88 135.0M
1 10 0 0 0 0 0 20.5 -89 135.0M
0 10 0 0 0 0 0 20.5 -88 135.0M
1 10 0 0 0 0 0 20.5 -87 135.0M
1 10 0 0 0 0 0 20.5 -89 135.0M
3 9 0 0 0 0 0 21.0 -89 135.0M
0 10 0 0 0 0 0 20.5 -88 135.0M
^C
% date ; uptime ; uname -KU
Fri 15 Apr 2022 17:55:37 BST
5:55p.m. up 2:33, 5 users, load averages: 0.83, 1.22, 1.46
1400056 1400056
%
wlanstats: [-ah] [-i ifname] [-l] [-m station MAC address] [-o fmt] [interval]
% wlanstats -l
rx_badversion rx frame with bad version
rx_tooshort rx frame too short
rx_wrongbss rx from wrong bssid
rx_dup rx discard 'cuz dup
rx_wrongdir rx w/ wrong direction
rx_mcastecho rx discard 'cuz mcast echo
rx_notassoc rx discard 'cuz sta !assoc
rx_noprivacy rx w/ wep but privacy off
rx_unencrypted rx w/o wep and privacy on
rx_wepfail rx wep processing failed
rx_decap rx decapsulation failed
rx_mgtdiscard rx discard mgt frames
rx_ctl rx ctrl frames
rx_beacon rx beacon frames
rx_rstoobig rx rate set truncated
rx_elem_missing rx required element missing
rx_elem_toobig rx element too big
rx_elem_toosmall rx element too small
rx_elem_unknown rx element unknown
rx_badchan rx frame w/ invalid chan
rx_chanmismatch rx frame chan mismatch
rx_nodealloc nodes allocated (rx)
rx_ssidmismatch rx frame ssid mismatch
rx_auth_unsupported rx w/ unsupported auth alg
rx_auth_fail rx sta auth failure
rx_auth_fail_code last rx auth failure reason
rx_auth_countermeasures rx sta auth failure 'cuz of TKIP countermeasures
rx_assoc_bss rx assoc from wrong bssid
rx_assoc_notauth rx assoc w/o auth
rx_assoc_capmismatch rx assoc w/ cap mismatch
rx_assoc_norate rx assoc w/ no rate match
rx_assoc_badwpaie rx assoc w/ bad WPA IE
rx_deauth rx deauthentication
rx_deauth_code last rx deauth reason
rx_disassoc rx disassociation
rx_disassoc_code last rx disassoc reason
bmiss beacon miss events handled
rx_badsubtype rx frame w/ unknown subtype
rx_nobuf rx failed for lack of mbuf
rx_decryptcrc rx decrypt failed on crc
rx_ahdemo_mgt rx discard mgmt frame received in ahdoc demo mode
rx_bad_auth rx bad authentication request
rx_unauth rx discard 'cuz port unauthorized
rx_badkeyid rx w/ incorrect keyid
rx_ccmpreplay rx seq# violation (CCMP)
rx_ccmpformat rx format bad (CCMP)
rx_ccmpmic rx MIC check failed (CCMP)
rx_tkipreplay rx seq# violation (TKIP)
rx_tkipformat rx format bad (TKIP)
rx_tkipmic rx MIC check failed (TKIP)
rx_tkipicv rx ICV check failed (TKIP)
rx_badcipher rx failed 'cuz bad cipher/key type
rx_nocipherctx rx failed 'cuz key/cipher ctx not setup
rx_acl rx discard 'cuz acl policy
tx_nobuf tx failed for lack of mbuf
tx_nonode tx failed for no node
tx_unknownmgt tx of unknown mgt frame
tx_badcipher tx failed 'cuz bad ciper/key type
tx_nodefkey tx failed 'cuz no defkey
tx_noheadroom tx failed 'cuz no space for crypto hdrs
tx_fragframes tx frames fragmented
tx_frags tx frags generated
scan_active active scans started
scan_passive passive scans started
scan_bg background scans started
node_timeout nodes timed out for inactivity
crypto_nomem cipher context malloc failed
crypto_tkip tkip crypto done in s/w
crypto_tkipenmic tkip tx MIC done in s/w
crypto_tkipdemic tkip rx MIC done in s/w
crypto_tkipcm tkip dropped frames 'cuz of countermeasures
crypto_ccmp ccmp crypto done in s/w
crypto_wep wep crypto done in s/w
crypto_setkey_cipher setkey failed 'cuz cipher rejected data
crypto_setkey_nokey setkey failed 'cuz no key index
crypto_delkey driver key delete failed
crypto_badcipher setkey failed 'cuz unknown cipher
crypto_nocipher setkey failed 'cuz cipher module unavailable
crypto_attachfail setkey failed 'cuz cipher attach failed
crypto_swfallback crypto fell back to s/w implementation
crypto_keyfail setkey failed 'cuz driver key alloc failed
crypto_enmicfail enmic failed (may be mbuf exhaustion)
ibss_capmismatch ibss merge faied 'cuz capabilities mismatch
ibss_norate ibss merge faied 'cuz rate set mismatch
ps_unassoc ps-poll received for unassociated station
ps_badaid ps-poll received with invalid association id
ps_qempty ps-poll received with nothing to send
ff_badhdr fast frame rx'd w/ bad hdr
ff_tooshort fast frame rx decap error
ff_split fast frame rx split error
ff_decap fast frames decap'd
ff_encap fast frames encap'd for tx
ff_encapfail fast frames encap failed
rx_badbintval rx frame with bogus beacon interval
rx_mgmt rx management frames
rx_demicfail rx demic failed
rx_defrag rx defragmentation failed
rx_action rx action frames
amsdu_tooshort A-MSDU rx decap error
amsdu_split A-MSDU rx failed on frame split
amsdu_decap A-MSDU frames received
amsdu_encap A-MSDU frames transmitted
rx_amsdu_more A-MSDU HW intermediary decap'ed received
rx_amsdu_more_end A-MSDU HW end decap'ed received
ampdu_reorder A-MPDU frames held in reorder q
ampdu_flush A-MPDU frames sent up from reorder q
ampdu_barbad A-MPDU BAR rx before ADDBA exchange (or disabled with net.link.ieee80211)
ampdu_baroow A-MPDU BAR rx out of BA window
ampdu_barmove A-MPDU BAR rx moved BA window
ampdu_bar A-MPDU BAR rx successful
ampdu_move A-MPDU frame moved BA window
ampdu_oor A-MPDU frames rx out-of-order
ampdu_copy A-MPDU rx window slots copied
ampdu_drop A-MPDU frames discarded for out of range seqno
ampdu_age A-MPDU frames sent up due to old age
ampdu_stop A-MPDU streams stopped
ampdu_stop_failed A-MPDU stop requests failed 'cuz stream not running
addba_reject ADDBA requests rejected 'cuz A-MPDU rx is disabled
addba_norequest ADDBA response frames discarded because no ADDBA request was pending
addba_badtoken ADDBA response frames discarded 'cuz rx'd dialog token is wrong
tx_badstate tx failed 'cuz vap not in RUN state
tx_notassoc tx failed 'cuz dest sta not associated
tx_classify tx packet classification failed
dwds_mcast mcast frame transmitted on dwds vap discarded
dwds_qdrop 4-address frame discarded because dwds pending queue is full
ht_nohtcap non-HT station rejected in HT-only BSS
ht_downgrade HT station downgraded to legacy operation
ht_norate HT station rejected because of HT rate set
mesh_wrong frame discarded because sender not a mesh sta
mesh_nolink frame discarded because link not established
mesh_fwd_ttl frame not forwarded because TTL zero
mesh_fwd_nobuf frame not forwarded because mbuf could not be allocated
mesh_fwd_tooshort frame not forwarded because too short to have 802.11 header
mesh_fwd_disabled frame not forwarded because administratively disabled
mesh_fwd_nopath frame not forwarded because no path found to destination
hwmp_wrongseq frame discarded because mesh sequence number is invalid
hwmp_rootreqs root PREQ frames sent
hwmp_rootann root RANN frames received
mesh_badae frame discarded for bad AddressExtension (AE)
mesh_rtadd mesh route add failed
mesh_notproxy frame discarded because station not acting as a proxy
rx_badalign frame discarded because payload re-alignment failed
input total data frames received
rx_ucast unicast data frames received
rx_mcast multicast data frames received
output total data frames transmit
tx_ucast unicast data frames sent
tx_mcast multicast data frames sent
rate current transmit rate
rssi current rssi
noise current noise floor (dBm)
signal current signal (dBm)
beacon_bad bad beacons received
ampdu_bartx BAR frames sent
ampdu_bartxfail BAR frames failed to send
ampdu_bartxretry BAR frames retried
%
/usr/src/tools/tools/net80211]# make install
===> stumbler (install)
install -s -o root -g wheel -m 555 stumbler /usr/local/bin/stumbler
install: stumbler: No such file or directory
*** Error code 71
Stop.
make[1]: stopped in /usr/src/tools/tools/net80211/stumbler
*** Error code 1
Stop.
make: stopped in /usr/src/tools/tools/net80211
… wlanstats on FreeBSD13 cannot install …
cd wlanstats
cd /usr/src/tools/tools/net80211 && make clean && cd wlanstats && make
root@freebsd:~ # freebsd-version -kru ; uname -aKU
13.0-RELEASE-p11
13.0-RELEASE-p11
13.0-RELEASE-p11
FreeBSD freebsd 13.0-RELEASE-p11 FreeBSD 13.0-RELEASE-p11 #0: Tue Apr 5 18:54:35 UTC 2022 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 1300139 1300139
root@freebsd:~ # pkg -vv | grep -e url -e enabled
url : "pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest",
enabled : yes,
root@freebsd:~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
root@freebsd:~ # time gitup release
# Scanning local repository...
# Host: git.freebsd.org
# Port: 443
# Repository Path: /src.git
# Target Directory: /usr/src
# Have: d7fd130ebe52733bcdc3c17fd1e49e7842dbe3e3
# Want: d7fd130ebe52733bcdc3c17fd1e49e7842dbe3e3
# Branch: releng/13.0
! /usr/src/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h has been modified.
! /usr/src/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h has been modified.
# Action: repair
* /usr/src/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h
* /usr/src/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h
# The local repository has been repaired. Please rerun gitup to pull the latest commit.
# Done.
2.080u 6.603s 1:49.14 7.9% 54+149k 100075+180io 48pf+0w
root@freebsd:~ # cd /usr/src/tools/tools/net80211 && make clean && cd wlanstats && make
===> stumbler (clean)
rm -f stumbler.o stumbler.bc stumbler.ll stumbler.full.bc stumbler.full.ll stumbler stumbler.bc stumbler.ll stumbler.full stumbler.debug stumbler.o stumbler.bc stumbler.ll
===> w00t (clean)
===> w00t/libw00t (clean)
rm -f w00t.o w00t.bco w00t.llo libw00t.a
===> w00t/ap (clean)
rm -f ap.o ap.bc ap.ll ap.full.bc ap.full.ll ap ap.bc ap.ll ap.full ap.debug ap.o ap.bc ap.ll
===> w00t/assoc (clean)
rm -f assoc.o assoc.bc assoc.ll assoc.full.bc assoc.full.ll assoc assoc.bc assoc.ll assoc.full assoc.debug assoc.o assoc.bc assoc.ll
===> w00t/expand (clean)
rm -f expand.o expand.bc expand.ll expand.full.bc expand.full.ll expand expand.bc expand.ll expand.full expand.debug expand.o expand.bc expand.ll
===> w00t/prga (clean)
rm -f prga.o prga.bc prga.ll prga.full.bc prga.full.ll prga prga.bc prga.ll prga.full prga.debug prga.o prga.bc prga.ll
===> w00t/redir (clean)
rm -f redir.o redir.bc redir.ll redir.full.bc redir.full.ll redir redir.bc redir.ll redir.full redir.debug redir.o redir.bc redir.ll
===> wesside (clean)
===> wesside/dics (clean)
rm -f dics.o dics.bc dics.ll dics.full.bc dics.full.ll dics dics.bc dics.ll dics.full dics.debug dics.o dics.bc dics.ll
===> wesside/udps (clean)
rm -f udps.o udps.bc udps.ll udps.full.bc udps.full.ll udps udps.bc udps.ll udps.full udps.debug udps.o udps.bc udps.ll
===> wesside/wesside (clean)
rm -f wesside.full.bc wesside.full.ll wesside wesside.bc wesside.ll wesside.full wesside.debug wesside.o aircrack-ptw-lib.o wesside.bco aircrack-ptw-lib.bco wesside.llo aircrack-ptw-lib.llo
===> wlaninject (clean)
rm -f wlaninject.o wlaninject.bc wlaninject.ll wlaninject.full.bc wlaninject.full.ll wlaninject wlaninject.bc wlaninject.ll wlaninject.full wlaninject.debug wlaninject.o wlaninject.bc wlaninject.ll
===> wlanstats (clean)
rm -f wlanstats.full.bc wlanstats.full.ll wlanstats wlanstats.bc wlanstats.ll wlanstats.full wlanstats.debug wlanstats.o main.o wlanstats.bco main.bco wlanstats.llo main.llo
===> wlantxtime (clean)
rm -f wlantxtime.o wlantxtime.bc wlantxtime.ll wlantxtime.full.bc wlantxtime.full.ll wlantxtime wlantxtime.bc wlantxtime.ll wlantxtime.full wlantxtime.debug wlantxtime.o wlantxtime.bc wlantxtime.ll
===> wlanwatch (clean)
rm -f wlanwatch.o wlanwatch.bc wlanwatch.ll wlanwatch.full.bc wlanwatch.full.ll wlanwatch wlanwatch.bc wlanwatch.ll wlanwatch.full wlanwatch.debug wlanwatch.o wlanwatch.bc wlanwatch.ll
===> wlanwds (clean)
rm -f wlanwds.o wlanwds.bc wlanwds.ll wlanwds.full.bc wlanwds.full.ll wlanwds wlanwds.bc wlanwds.ll wlanwds.full wlanwds.debug wlanwds.o wlanwds.bc wlanwds.ll
cc -O2 -pipe -fno-common -I/usr/src/tools/tools/net80211/wlanstats/../../../../lib/libbsdstat/ -g -MD -MF.depend.wlanstats.o -MTwlanstats.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -fbracket-depth=512 -Qunused-arguments -c /usr/src/tools/tools/net80211/wlanstats/wlanstats.c -o wlanstats.o
/usr/src/tools/tools/net80211/wlanstats/wlanstats.c:465:8: error: cast from 'struct sockaddr *' to 'const struct sockaddr_dl *' increases required alignment from 1 to 2 [-Werror,-Wcast-align]
sdl = (const struct sockaddr_dl *) p->ifa_addr;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
*** Error code 1
Stop.
make: stopped in /usr/src/tools/tools/net80211/wlanstats
root@freebsd:/usr/src/tools/tools/net80211/wlanstats #
cc -O2 -pipe -fno-common -I/usr/src/tools/tools/net80211/wlanstats/../../../../lib/libbsdstat/ -g -MD -MF.depend.wlanstats.o -MTwlanstats.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -fbracket-depth=512 -Qunused-arguments -c /usr/src/tools/tools/net80211/wlanstats/wlanstats.c -o wlanstats.o
/usr/src/tools/tools/net80211/wlanstats/wlanstats.c:465:8: error: cast from 'struct sockaddr *' to 'const struct sockaddr_dl *' increases required alignment from 1 to 2 [-Werror,-Wcast-align]
sdl = (const struct sockaddr_dl *) p->ifa_addr;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
*** Error code 1
Stop.
make: stopped in /usr/src/tools/tools/net80211/wlanstats
usr/src/tools/tools/net80211/wlanstats]# make
cc -O2 -pipe -fno-common -I/usr/src/tools/tools/net80211/wlanstats/../../../../lib/libbsdstat/ -g -MD -MF.depend.wlanstats.o -MTwlanstats.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -fbracket-depth=512 -Qunused-arguments -c /usr/src/tools/tools/net80211/wlanstats/wlanstats.c -o wlanstats.o
/usr/src/tools/tools/net80211/wlanstats/wlanstats.c:465:8: error: cast from 'struct sockaddr *' to 'const struct sockaddr_dl *' increases required alignment from 1 to 2 [-Werror,-Wcast-align]
sdl = (const struct sockaddr_dl *) p->ifa_addr;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
*** Error code 1
Stop.
make: stopped in /usr/src/tools/tools/net80211/wlanstats
ifconfig wlan0 list status
is not very clear at all..is that the value in dBm?… FreeBSD13 …
Same here …
freebsd-version -kru ; uname -aKU
13.1-RC3
in one virtual machine, I was mid-way through upgrading a second VM (aiming to make the stop reproducible with the same version elsewhere) when things went horribly wrong.13.1-RC3
or greater (see below), it might be good to precede the upgrade with an update to 13.0-RELEASE-p11
(patch level 11). Maybe not strictly required, but I'm sometimes twitchy about situations where the base system is so far out of date.… encountered the stop with13.1-RC3
in one virtual machine,
I was mid-way through upgrading a second VM (aiming to make the stop reproducible with the same version elsewhere) …
13.1-RC3
?root@freebsd:~ # pkg -vv | grep -e url -e enabled
url : "pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest",
enabled : yes,
root@freebsd:~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
root@freebsd:~ # freebsd-version -kru ; uname -aKU
13.1-RC3
13.1-RC3
13.1-RC3
FreeBSD freebsd 13.1-RC3 FreeBSD 13.1-RC3 releng/13.1-n250110-ec2fbe4b1ec GENERIC amd64 1301000 1301000
root@freebsd:~ # gitup release
# Scanning local repository...
# Host: git.freebsd.org
# Port: 443
# Repository Path: /src.git
# Target Directory: /usr/src
# Have: e74c79e48ef1620b7b5a3c29dd316d30bda55790
# Want: e74c79e48ef1620b7b5a3c29dd316d30bda55790
# Branch: releng/13.1
# Done.
root@freebsd:~ # cd /usr/src/tools/tools/net80211/wlanstats
root@freebsd:/usr/src/tools/tools/net80211/wlanstats # make
rm -f .depend
echo wlanstats.full: /usr/lib/libc.a /usr/lib/libprivatebsdstat.a >> .depend
cc -O2 -pipe -fno-common -I/usr/src/tools/tools/net80211/wlanstats/../../../../lib/libbsdstat/ -fPIE -g -MD -MF.depend.wlanstats.o -MTwlanstats.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-variable -fbracket-depth=512 -Wno-cast-align -Qunused-arguments -c /usr/src/tools/tools/net80211/wlanstats/wlanstats.c -o wlanstats.o
cc -O2 -pipe -fno-common -I/usr/src/tools/tools/net80211/wlanstats/../../../../lib/libbsdstat/ -fPIE -g -MD -MF.depend.main.o -MTmain.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-variable -fbracket-depth=512 -Wno-cast-align -Qunused-arguments -c /usr/src/tools/tools/net80211/wlanstats/main.c -o main.o
cc -O2 -pipe -fno-common -I/usr/src/tools/tools/net80211/wlanstats/../../../../lib/libbsdstat/ -fPIE -g -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-variable -fbracket-depth=512 -Wno-cast-align -Qunused-arguments -pie -o wlanstats.full wlanstats.o main.o -lprivatebsdstat
objcopy --only-keep-debug wlanstats.full wlanstats.debug
objcopy --strip-debug --add-gnu-debuglink=wlanstats.debug wlanstats.full wlanstats
root@freebsd:/usr/src/tools/tools/net80211/wlanstats # which wlanstats
wlanstats: Command not found.
root@freebsd:/usr/src/tools/tools/net80211/wlanstats # make install
install -s -o root -g wheel -m 555 wlanstats /usr/local/bin/wlanstats
install -d /usr/local/bin/.debug/
install -o root -g wheel -m 444 wlanstats.debug /usr/local/bin/.debug/wlanstats.debug
root@freebsd:/usr/src/tools/tools/net80211/wlanstats # which wlanstats
/usr/local/bin/wlanstats
root@freebsd:/usr/src/tools/tools/net80211/wlanstats # make clean
rm -f wlanstats.full.bc wlanstats.full.ll wlanstats wlanstats.bc wlanstats.ll wlanstats.full wlanstats.debug wlanstats.o main.o wlanstats.bco main.bco wlanstats.llo main.llo
root@freebsd:/usr/src/tools/tools/net80211/wlanstats # cd
root@freebsd:~ # exit
logout
freebsd@freebsd:/usr/home/freebsd $
echo Last update: " $(date)" | sed 's/^/"/' | sed 's/[^[print:]]*$/"&/' | awk '{print $6}' | cut -d : -f1 -f2 | tr \\n ' ' >> DBM.dat && wlanstats -i wlan1 | awk -F, "NR==28{print $1;}" | awk '{print $1}' >> DBM.dat
echo Last update: " $(date)" | sed 's/^/"/' | sed 's/[^[print:]]*$/"&/' | awk '{print $6}' | cut -d : -f1 -f2 | tr \\n ' ' >> RSSI.dat && wlanstats -i wlan1 | awk -F, "NR==26{print $1;}" | awk '{print $1}' >> RSSI.dat
echo Last update: " $(date)" | sed 's/^/"/' | sed 's/[^[print:]]*$/"&/' | awk '{print $6}' | cut -d : -f1 -f2 | tr \\n ' ' >> AMRR.dat && tail -n 30 /var/log/messages | grep current | sed '$!d' | awk '{print $11}' | awk -F"," '{print $1}' >> AMRR.dat
set terminal png size 800,500 enhanced font 'Verdana,9';
set datafile separator " "
set output 'dbm_level.png';
set style line 80 lt 0 lc rgb "#808080"
set style line 1 lt 1 lc rgb "#A00000" lw 1 pt 7 ps 1.5
set xdata time
set timefmt "%H:%M"
set format x "%H:%M"
set yrange ["-120":"-25"]
set ylabel "dBm";
set xtics rotate
set grid
set title "RTL8188";
plot "DBM.dat" using 1:2 w l ls 1 smooth unique title "RTL8188 dBm" ,