Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!spool2.mu.edu!news.cs.indiana.edu!sahayman@iuvax.cs.indiana.edu From: sahayman@iuvax.cs.indiana.edu (Steve Hayman) Newsgroups: comp.sys.next Subject: NeXT "audio ping" for network debugging Message-ID: <1991Jan23.211609.877@news.cs.indiana.edu> Date: 23 Jan 91 21:15:24 GMT Sender: daemon@news.cs.indiana.edu Organization: Computer Science, Indiana University Lines: 59 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 129.79.254.138: icmp_seq=0. time=3. ms # 64 bytes from 129.79.254.138: 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 -- Steve Hayman Workstation Manager Computer Science Department Indiana U. sahayman@iuvax.cs.indiana.edu (812) 855-6984 NeXT Mail: sahayman@spurge.bloomington.in.us