c.f.waltrip
Internet: <wal...@capd.jhuapl.edu>
Opinions expressed are my own.
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.
saha...@iuvax.cs.indiana.edu (812) 855-6984
NeXT Mail: saha...@spurge.bloomington.in.us
Steve's creation deserves the ultimate compliment -- "Why didn't
I think of that?"
Thanks, Steve.
Vic Abell
Assistant Director
Purdue University Computing Center