Eric Sand wrote: > Here is a listing of a ping script I use once in awhile, contributed > by none other than Patrick Santucci. Haven't seen a posting from him > lately, but I hope all is well. I'm quite well, thanks. I've just been extremely busy here at Cornerstone. (Gotta get rid of some of these extra "hats" somehow...) I don't have time to read the list much anymore, just kind of scan it now and then. I was quite surprised to see my name mentioned, in fact. The PING command file went through several revisions after I first posted it, since I received some suggestions back. Here's the latest version (note that it hasn't been updated since 1999, and probably should be!). ---8<--- Begin copying after this line ---8<--- parm node="" packets=5 pktsize=128 # # PING.XEQ.SYS v1.4 10-20-1999 by Patrick Santucci # See Revision History at end of file. # # This file is a front end for the two PING utilities provided by HP. # It determines whether you are pinging by node name or IP address and # calls the appropriate utility based on that. # if "!node" = "" then # Let me explain how this works... echo echo Syntax: echo echo PING !<Nodename_or_Address!> [# of packets] & [packet size (bytes)] echo (default: 5) & (default: 128) echo echo Examples: echo echo PING hewey 3 256 sends 3 packets of 256 bytes each echo PING 10.60.240.11 sends 5 packets of 128 bytes each echo PING morg.from.org 20 64 sends 20 packets of 64 bytes each echo return endif if not numeric(word("!node",".")) then # # This is a node name. We'll use NETTOOL.NET.SYS and assume the # system is using some sort of name resolution service, like # external DNS or a HOSTS (/etc/hosts) file. # # Build a temp file to use as input to NETTOOL, in case the # node name is not resolved. echo quit >pinginpt # # Now run NETTOOL and see if we can PING! nettool.net.sys 'ping;size !pktsize;number !packets;& ping !node;quit' <pinginpt echo else # # This is a numeric IP address, hopefully a valid one. # We'll use PING.NET.SYS because it's quicker and easier. # Include instructions on stopping in case user sends 1000 # packets or something equally heinous. # echo echo *** Type Ctrl+Y to stop *** run ping.net.sys;info="!node, !packets, !pktsize" endif # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Revision History: # # v1.4 10-20-99 - Fixed an error introduced in v1.2 where an invalid # node name (i.e. one that isn't resolved by DNS or # /etc/hosts file) left you stranded inside NETTOOL # with the error "Rest of commands ignored". Got around # this by using redirection of an additional "quit" # command in addition to the stacked INFO string. # v1.3 10-15-99 - Changed POS() construction to use WORD() string # function per Jeff Vance's suggestion. # v1.2 10-14-99 - Changed NETTOOL portion to use stacked INFO= with # implied run instead of redirected input, per # Greg Stigers' suggestion. # - Decided I better include revision history in the # command file since I'm incorporating other people's # ideas. # v1.1 10-05-99 - Consolidated PINGIP and PINGDNS files into # the calling file, PING. Better to have only # one file to maintain. :-) # - Added syntax help for the CI-challenged. # v1.0 10-01-99 - Initial command file(s). Don't need to check the # 'packets' and 'pktsize' parms because the HP-supplied # programs do that just fine. :-) ---8<--- Stop copying before this line ---8<--- Thanks, Patrick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Patrick Santucci HP e3000 Systems Administrator Computer Operations Team Lead Networking Services Department Cornerstone Brands, Inc. http://cornerstonebrands.com * To join/leave the list, search archives, change list settings, * * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *