I finally got around to finding a real purpose for a monitor in my home office that’s been idle for a long time. I put together a quick hack to display the round trip time and packet loss to some of the devices in my home. It is using ICMP, is multi-threaded (as is nearly everything I’ve written in C++ in the last 20 years), and I’m using qcustomplot for display.
I’m calling this ‘qmcping’. I run this on an ancient 1920×1200 display in my home office, next to the qmcrover display. It runs fine on a Raspberry Pi 4, but I’m running in on my Threadripper workstation since that’s the machine connected to this monitor. I only use the workstation via remote access, so I run ‘qmcping’ full screen via a direct frame buffer (no X11 or Wayland). It runs 7×24.
The statistical boxes show the minimum RTT, 25th percentile RTT, median RTT, 75th percentile RTT and 95th percentile RTT for the last 100 echo requests. The red bars show packet loss for the last 100 echo requests. At a glance I can see if things are fairly normal on my home network.
I also have a curses version called ‘mcping’ that I can run in a terminal. It looks like below.
To some extent there is sort of some humor in the fact that I didn’t do this a long time ago. In the early 1990’s, I was the author of an ICMP monitor for a large network service provider, with a list of targets in the 10s of thousands (eventually more than 100,000). It was written in C, but not all that much different. This isn’t difficult code to write.
What has changed? Well, I don’t trust the Internet and haven’t for a long time. The late 1980’s and early 1990’s were a naive time for TCP/IP. That time has passed. So today, my ICMP monitor puts a cryptographically strong random 32-byte sequence in each echo request. When I receive an echo reply, I verify that this sequence is one I recently sent to the destination. This helps prevent someone from spoofing an ICMP echo reply.

