Subject: | |
From: | |
Reply To: | |
Date: | Thu, 14 Oct 1999 08:25:22 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Here's a command file I recently wrote because I was tired of having to go
to NETTOOL.NET.SYS to ping a box whose address I didn't know. It accepts
both DNS node names and IP addresses and acts accordingly. Standard
disclaimers apply. :-)
Filename: PING.XEQ.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
Hey, Tim Ericson, does this get me onto the Denkor MPE command files page?
Enjoy,
Patrick
-------------------- Lotus "Knots" Reply Separator --------------------
Please respond to Ron Wallace <[log in to unmask]>
To: [log in to unmask]
cc: (bcc: Patrick Santucci/DSM/Seabury)
Subject: [HP3000-L] PING
How do I ping, or can ping an address from the HP3000
Thanks
Ron Wallace
Fresno, Ca
|
|
|