One useful addition to OS X that Apple included in version 10.7, aka Lion, was a network diagnostics tool for generating troubleshooting reports and monitoring network performance. The tool was fairly well-rounded and helpful for troubleshooting networking problems, and in OS X Mountain Lion Apple has enhanced it with additional options and features.
First off, while previously the tool was only available from directly in the /System/Library/CoreServices folder, it is now more conveniently available by holding the Option key, clicking the Wi-Fi menu, and selecting Open Wi-Fi Diagnostics.
When the utility opens, you will have two general areas to use. The first is the default diagnostics window, but there is also a set of network tools for monitoring and accessing network services.
In the default window you can get diagnostics reports, turn on various debugging logs, and capture network traffic. These options are easy to run, but the results are rather technical in nature and are primarily for advanced users and technicians. However, if you are having troubles and a technician needs a full report, then you get the needed information here.
- Creating diagnostics reports
If you select the option to create a diagnostics report, the tool will run checks for resolving network services, scanning nearby networks, running diagnostic tests, and monitoring network activity. It will then compress the individual results of these tests in a TGZ file on your Desktop that can be submitted to Apple or to others for diagnosic purposes.
When these tests are run, you will see a revolving indicator next to them. During this time you can access related tool features or get more information on the test by clicking its name. For instance, clicking on the Resolve Network Services listing will bring up the tool's networking utilities, and if you click on the Run Diagnostic Tests listing then you will see a breakdown of the individual tests being run.
- Turn on Debug logs
The second diagnostics option is to temporarily turn on the system's debugging features for network services, which enable an active and detailed logging of several specific network services. These include DNS resolution, DHCP access, Wake on Wireless events, and Open Directory activity. These can be activated individually or in groups called Basic or Advanced. The logging will be enabled only when running the tool, and will turn off when you close the window, so you can choose what tasks to log.
When you stop the logging, the tool will save the logs in a diagnostics report that will be placed on your desktop in a compressed TGZ format.
- Frame Capture
The last diagnostics option is a frame capture feature that can save raw network data from any network interface. You can limit the captured data to specific Wi-Fi channels or only that which is received by your computer as opposed to all detectable network activity. Do keep in mind that network activity captured with this feature can include confidential data such as passwords, but Apple offers a warning about this whenever you use the feature.
The frame capture will start when you click the Start button and then continue until you click the Stop Capture button. Then, as with the other diagnostics options, the utility will save the report to the desktop in a TGZ file.
While the Wi-Fi diagnostics options are shown by default, the tool has other options for testing network connections, which include performance monitors, network scanning, service discovery, and interfaces for popular networking terminal commands like "ping" and "traceroute."
To get to the Network Utilities, you can select them individually from the View menu, choose Network Tools from the File menu, or press Command-N. Doing so will bring up a small window that contains four sections: Performance, Wi-Fi Scan, Bonjour, and Tools.
Like prior versions of the OS X Wi-Fi diagnostics utility, the Mountain Lion version includes a signal strength and network traffic monitor to be found the Performance section. This will show you a classic signal and noise power level chart and a history of sent and received packets, which as we outlined in prior coverage of this utility can be used to assess signal quality.
The Scan feature has several options for detecting available Wi-Fi networks in your vicinity. OS X will cache networks it has recently detected, so the first option is to simply list what is in the cache. The next options are passive and active scans of the Wi-Fi networks. With the passive scan, the system will just listen for broadcasting networks, but in active scan the system will probe for wireless connections. Since Wi-Fi networks regularly broadcast their information this should not be needed, but it is an option.
The next option is a network discovery feature that will detect available services on the local network and list them in a single window. While many of these services are accessible in the Finder, it also shows SSH, SFTP, and other options that are being broadcast. If you click on one of the listed services, then the system will attempt to connect to it using the default program (for example, Terminal for SSH connections). This feature can be exceptionally useful for determining what protocols and URLs are available for establishing a local-area connection to a Mac.
The last option in the Wi-Fi Diagnostics Utility is similar to Apple's standalone Network Utility (in the /Applications/Utilities/ folder), which is a graphical front end for a number of popular networking terminal commands in OS X. While most of the commands, such as whois, finger, ping, and traceroute, are similar to those in Apple's Network Utility, the Wi-Fi Diagnostics utility has additional ones, including IPv6 options for ping and traceroute, and the route and arp commands.
These additions to the Wi-Fi Diagnosics tool in OS X are very nice to have, and make the tool even more helpful for diagnosing and resolving network-related problems.
Thanks to Alf Watt, MacFixIt reader and developer of the popular iStumbler network diagnostics tool, for many of these tips.