Gathering Information on Your Wi-Fi NIC and Connection on Linux
Tom Fenton shares his tools for monitoring built-in device Wi-Fi among the wide variety of Linux versions and GUI interfaces.
I have been working with a lot of edge devices and virtual desktop infrastructure (VDI) clients lately and one of the issues that I have encountered is that many of these devices have built-in Wi-Fi that I need to monitor and gather information about.
Because many edge devices run Linux -- which in turn means a wide variety of Linux versions and GUI interfaces that each supports -- I have found it easier to use the command line to monitor the Wi-Fi of these devices.
In this article, I will show you some of the command-line tools that I use to monitor Wi-Fi NICs on Linux edge devices.
The /proc Filesystem
Most of the information provided by these command-line tools comes from /proc, a pseudo-file-system that contains runtime information about the system, such as CPU, memory and networking; it even contains information about the processes that are running on it. Some of the commands are just a shortcut to the information in /proc. For example, lsmod is the same as cat /proc/modules, and lspci is the same as cat /proc/pci.
By looking at /proc, you can discover some fascinating insights into your system. However, despite its usefulness, extreme caution must be used with /proc, as making changes to the files located within it can change kernel parameters while the system is running, which may cause unpredictable results.
/proc allows you to see the PID of all the active processes on the system, as well as directories for the major subsystems on it.
For instance, cat /proc/cpuinfo will display information about the CPU.
You can find information about the Wi-Fi by entering cat /proc/net/wireless.
This tells us, among other things, information about the interface and the quality of the Wi-Fi connection. The quality of the connection in the example above has a link level of -45. The link level can be a little bit confusing, but it is a performance metric most people are concerned with. The level is a negative number, so -50 means the signal is fine, but if it gets to -80 it will be borderline unusable.
WI-FI Command Line Tools
Below are some of the commands that will work with most Linux systems, and are ones that I have found most useful:
Different versions of Linux have different tools and GUIs that can be used to show information about your network. Many of these tools are easier and more intuitive to use than the commands shown above, but I have found the ability to use a standard set of commands that do not rely on having a graphical interface to be very valuable.
Tom Fenton has a wealth of hands-on IT experience gained over the past 30 years in a variety of technologies, with the past 20 years focusing on virtualization and storage. He currently works as a Technical Marketing Manager for ControlUp. He previously worked at VMware in Staff and Senior level positions. He has also worked as a Senior Validation Engineer with The Taneja Group, where he headed the Validation Service Lab and was instrumental in starting up its vSphere Virtual Volumes practice. He's on X @vDoppler.