Subject: | |
From: | |
Reply To: | |
Date: | Tue, 6 May 2003 17:50:09 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hi Folks,
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.
Eric Sand
[log in to unmask] <mailto:[log in to unmask]>
SANDBOX:MGR.MIGRDEVL:help pingdns
USER DEFINED COMMAND FILE: PINGDNS.CF.SYS
parm node="" packets=5 pktsize=128
#
# PING.XEQ.SYS v 1.1
# 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.
#
# Note: Don't need to check the 'packets' and 'pktsize' parms because
# the HP-supplied programs do that just fine. :-)
#
# Written 1 Oct 1999 by Patrick Santucci
# [log in to unmask]
#
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 pos(".","!node") = 0 or not numeric(str("!node",1,pos(".","!node")-1))
then
#
# This is a node name. We'll use NETTOOL.NET.SYS and assume the
# system is using sort of name resolution service, like external
# DNS or a HOSTS file.
#
# Build a temp file to use as input to NETTOOL...
echo ping >pinginpt
echo size !pktsize >>pinginpt
echo number !packets >>pinginpt
echo ping !node >>pinginpt
echo exit >>pinginpt
echo exit >>pinginpt
echo y >>pinginpt
# Run NETTOOL with redirected input...
nettool.net.sys <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.
#
echo
echo *** Type Ctrl+Y to stop ***
run ping.net.sys;info="!node, !packets, !pktsize"
endif
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|