IT / MIS / Engineering

NetDiag Tool

 

From time to time, when occasion rises, I’ll find myself needing to quickly determine the actual problem, when I get a report of “the internet is down”.  As you know (if you’re enough of an IT nerd to bother reading this), it’s important at the start of troubleshooting to know what the problem actually is as “the internet is down” could easily mean any of the following: the wireless AP is down, the LAN switching is down, the router/firewall is down, or the internet uplink is actually down.

As a personal habit, it seems that every single time I’m sitting at my laptop, on wireless myself, and I get this report, I always do the following: check my menubar airport icon to determine whether I’m still associated with the SSID, then open a terminal window and try to ping myself, try to ping my LAN gateway/router, try to ping an internet host (known to respond to ICMP), and finally try to ping a DNS hostname.  The results I see from these steps will always let me know exactly where I need to investigate further (if not revealing the issue directly).

Anyway, I’ve found myself doing this so often lately that, I figured I’d just make a quick utility to do it.  First I wrote a simple bash utility (and put it in /usr/local/bin), so that I can simply open a terminal window, and type “netdiag”, hit return, and I’ll get a quick readout of all of those previously mentioned tests.

 

 

Look, pretty colors even!

 

After finishing that, I thought of a few consultants I know who might be more comfortable simply being able to see this in their regular macOS GUI environment.  So, I went ahead and wrote this bare bones GUI app/utility (hooray for AppleScript!).

 

 

Could you even ask for a more clear readout?

 

Anyway, that’s it.  Nothing super special, I just thought I’d share it in the event anyone else finds it useful.

You can download a dmg containing both the GUI app and command line version right here.

Or, you can also get it, the command line version alone, or inspect the code in it’s Github repo here.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *