Thirty years ago today I achieved my first mild dose of Internet fame, with this post to the old comp.sys.next Usenet newsgroup. Here’s the original post first – and let me tell you about what happened afterwards. Also it involves ducks.
Date: Sun 23-Jan-1991 21:15:24 From: email@example.com (Steve Hayman) Subject: NeXT "audio ping" for network debugging The thinwire started messing up in the building where I work yesterday; I was scurrying around with an ethernet terminator cutting off segments of the network to try to isolate where the problem was. I have a NeXT and a Sun on my desk, and was trying to 'ping' the Sun from the NeXT. Whether it worked depended on where I cut the network off. ping is a good tool for debugging but it sure is a pain to have to run back to your office to see if any of the ping packets are getting through. So I came up with this quick hack. 1) Use "sndrecord ping.snd", hit return, say the word "PING" into the mike hit return again. Try to make the recording less than 1 second long. 2) Run this script #!/bin/sh # audio-ping host # output of 'ping' looks like this: # # ping porbeagle # PING porbeagle.cs.indiana.edu: 56 data bytes # 64 bytes from 22.214.171.124: icmp_seq=0. time=3. ms # 64 bytes from 126.96.36.199: icmp_seq=1. time=3. ms # ... # one line per second. no output is produced if the packets # aren't coming back. # This script plays a sound whenever it sees a line with "icmp_seq" on it. # ping $1 2>&1 | while read line; do case "$line" in *icmp_seq*) sndplay ping.snd ;; esac done Now start this up. Crank up the volume on your NeXT to the max. You can now wander through the building fiddling with the network, unplugging different machines and so on; if it's working you'll hear this voice saying PING ... PING ... PING; if it quits working the voice will stop. If you wanted to get really fancy you could play a different sound for some of the other messages that ping might generate - sometimes ping says "network is down", for instance. This script helped me find a faulty tee-connector in just about a minute. OK it's a dumb hack. Steve
ping? what’s that?
ping is a Unix tool that attempts to make a connection to a remote computer, and once a second, it will print a line of received data. It’s a quick way to check if your network is working. Ping a faraway computer, and if you get a line of information back every second, your network is working.
I still use this today.
so what where you trying to do in 1991?
I was working for the computer science department at Indiana University – we’d temporarily been relocated to, I think, this building –
while the main CS building was being renovated (and wow, did I ever wind up with a great office in the renovated building when it was done, Lindley Hall – corner office, top floor, overlooking the quad… and two weeks after we moved in, I quit to come back to Canada. I’ll never have an office like that again.)
The network in our little house wasn’t working. I was running this ‘ping’ program and had to keep returning to my desk to see if it was working, as I experimented with changing network settings and futzing with cables on other computers in the building. We didn’t have portable computers, that’s for sure.
So what I did above was to combine the sound recording tool on my NeXT cube on my desk, with the Unix ping program, in a way that my computer would play a recording of me saying PING once a second when the network was working, and it’d be silent otherwise. I could then wander through the building adjusting things and when I heard the PING sound from upstairs, I knew I’d fixed it.
I didn’t think this was such a big deal but posted the above writeup to the net.
A few people congratulated me.
and then what?
Somehow this little hack made it into the Jargon File, a legendary compilation of hacker terminology, and a subsequent book, The New Hacker’s Dictionary.. If you check the jargon file today, 30 years later, you can see this entry for ping–
ping [from the submariners’ term for a sonar pulse] 1. n. Slang term for a small network message (ICMP ECHO) sent by a computer to check for the presence and alertness of another. The Unix command `ping(8)’ can be used to do this manually (note that `ping(8)”s author denies the widespread folk etymology that the name was ever intended as acronym `Packet INternet Groper’). Occasionally used as a phone greeting. See ACK, also ENQ. 2. /vt./ To verify the presence of. 3. /vt./ To get the attention of. 4. /vt./ To send a message to all members of a mailing list requesting an ACK (in order to verify that everybody’s addresses are reachable). “We haven’t heard much of anything from Geoff, but he did respond with an ACK both times I pinged jargon-friends.” 5. /n./ A quantum packet of happiness. People who are very happy tend to exude pings; furthermore, one can intentionally create pings and aim them at a needy party (e.g., a depressed person). This sense of ping may appear as an exclamation; “Ping!” (I’m happy; I am emitting a quantum of happiness; I have been struck by a quantum of happiness). The form “pingfulness”, which is used to describe people who exude pings, also occurs. (In the standard abuse of language, “pingfulness” can also be used as an exclamation, in which case it’s a much stronger exclamation than just “ping”!). Oppose blargh.
The funniest use of `ping’ to date was described in January 1991 by Steve Hayman on the Usenet group comp.sys.next. He was trying to isolate a faulty cable segment on a TCP/IP Ethernet hooked up to a NeXT machine, and got tired of having to run back to his console after each cabling tweak to see if the ping packets were getting through. So he used the sound-recording feature on the NeXT, then wrote a script that repeatedly invoked `ping(8)’, listened for an echo, and played back the recording on each returned packet. Result? A program that caused the machine to repeat, over and over, “Ping … ping … ping …” as long as the network was up. He turned the volume to maximum, ferreted through the building with one ear cocked, and found a faulty tee connector in no time.
I gotta tell ya, to have your name mentioned in the Jargon File certainly gives you an aura of street cred in certain strange circles!
not only that
The Ping program itself was written by a legendary Unix developer at AT&T Bell Labs named Mike Muuss. He tragically passed away in a car accident in 2000 but his personal web site lives on, and I was delighted to see his page titled, The Story of the Ping Program.
He tells the interesting story of the birth of this program and then – much to my delight – includes this anecdote, which is mostly accurate
The best ping story I’ve ever heard was told to me at a USENIX conference, where a network administrator with an intermittent Ethernet had linked the ping program to his vocoder program, in essence writing:ping goodhost | sed -e 's/.*/ping/' | vocoder
He wired the vocoder’s output into his office stereo and turned up the volume as loud as he could stand. The computer sat there shouting “Ping, ping, ping…” once a second, and he wandered through the building wiggling Ethernet connectors until the sound stopped. And that’s how he found the intermittent failure.
Imagine my delight at stumbling across that, from the author of ping himself.
the best part
There’s a famous children’s book from 1933 called “The Story about Ping”. It’s about a duck, of course. A Duck! Ping, a spirited little duck who lives on a boat on the Yangtze River and gets into various misadventures. It’s about a duck. A duck named Ping.
But Mike Muuss’s page mentioned this legendary Amazon review of the book which still makes me laugh today.
A reader from Upper Volta, Uzbekistan, March 7, 1999
Excellent, heart-warming tale of exploration and discovery. Using deft allegory, the authors have provided an insightful and intuitive explanation of one of Unix’s most venerable networking utilities. Even more stunning is that they were clearly working with a very early beta of the program, as their book first appeared in 1933, years (decades!) before the operating system and network infrastructure were finalized.
The book describes networking in terms even a child could understand, choosing to anthropomorphize the underlying packet structure. The ping packet is described as a duck, who, with other packets (more ducks), spends a certain period of time on the host machine (the wise-eyed boat). At the same time each day (I suspect this is scheduled under cron), the little packets (ducks) exit the host (boat) by way of a bridge (a bridge). From the bridge, the packets travel onto the internet (here embodied by the Yangtze River).
The title character — er, packet, is called Ping. Ping meanders around the river before being received by another host (another boat). He spends a brief time on the other boat, but eventually returns to his original host machine (the wise-eyed boat) somewhat the worse for wear.
The book avoids many of the cliches one might expect. For example, with a story set on a river, the authors might have sunk to using that tired old plot device: the flood ping. The authors deftly avoid this.
Who Should Buy This Book
If you need a good, high-level overview of the ping utility, this is the book. I can’t recommend it for most managers, as the technical aspects may be too overwhelming and the basic concepts too daunting.
Problems With This Book
As good as it is, The Story About Ping is not without its faults. There is no index, and though the ping(8) man pages cover the command line options well enough, some review of them seems to be in order. Likewise, in a book solely about Ping, I would have expected a more detailed overview of the ICMP packet structure.
But even with these problems, The Story About Ping has earned a place on my bookshelf, right between Stevens’ Advanced Programming in the Unix Environment, and my dog-eared copy of Dante’s seminal work on MS Windows, Inferno. Who can read that passage on the Windows API (“Obscure, profound it was, and nebulous, So that by fixing on its depths my sight — Nothing whatever I discerned therein.”), without shaking their head with deep understanding. But I digress.