LinuxCommandLibrary

iwspy

Show wireless interface statistics for specified stations

SYNOPSIS

iwspy ifname [address1 [address2 ...]] [reset]

PARAMETERS

ifname
    Required wireless interface name (e.g., wlan0)

[address1 ... addressN]
    Optional MAC addresses (xx:xx:xx:xx:xx:xx) to add to spy list

reset
    Clears the entire spy list

DESCRIPTION

iwspy is a utility from the Linux Wireless Tools package used to monitor signal quality, link strength, noise levels, and packet transmission statistics for specific wireless stations on a given interface. It configures the kernel driver's 'spy list' by specifying MAC addresses of stations to track, such as access points or peers in ad-hoc mode. The driver collects per-station metrics via Wireless Extensions ioctl calls.

To display current statistics, run iwspy ifname without addresses. Output shows for each station:
Address: MAC address
Link Quality: xx/92 (92 being perfect)
Signal level: -xx dBm or xx/100
Noise level: -xx dBm or xx/100
NWI: Number of packets not successfully transmitted (avg per sec).

This is useful for troubleshooting Wi-Fi performance, roaming analysis, or interference detection. Statistics update dynamically while the list is active. The feature relies on driver support for the spy mechanism.

CAVEATS

Deprecated in modern kernels; requires Wireless Extensions (WE) drivers. cfg80211/nl80211 drivers (common since kernel 2.6.30) lack support. Use iw dev ifname station dump or iwinfo instead. No output if list empty or unsupported.

USAGE NOTES

Run iwspy ifname to display stats (sets nothing). Add addresses to update list. Stats persist until reset, interface down, or reboot.

EXAMPLE

$ iwspy wlan0 00:11:22:33:44:55
$ iwspy wlan0
wlan0 Address: 00:11:22:33:44:55
Link Quality=85/92 Signal level=-32/100 Noise level=-256/100 NWI=0

HISTORY

Part of wireless-tools by Jean Tourrilhes, started 1996. iwspy added ~2002 for Prism/HostAP/Atheros drivers. Phased out post-2010 with mac80211 adoption.

SEE ALSO

iwconfig(8), iwlist(8), iwpriv(8), iw(8)

Copied to clipboard