Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ping options

Status
Not open for further replies.

StickyBit

Technical User
Jan 4, 2002
264
CA
What ping options would I use to send fewer packets to a host? I am trying to shorten the amount of time it takes for my prompt to be returned to me if a host doesn’t respond. The options will be used in my script which is currently taking to long to run, due to hosts not responding to ping.

Thanks.
 
ping on Solaris only sends one packet by default, it's the timeout you need to reduce. Unfortunately there doesn't appear to be any option to do so. Annihilannic.
 
I just checked ping on a solaris box and found this:

/usr/sbin/ping host [ timeout ]

I tried it and it seems to work.

for HOST in `cat /tmp/table`
do
/usr/sbin/ping ${HOST} 5 # Where 5 = 5 seconds
done
 
I think I need new glasses! [3eyes]

The number of times I've trawled that man page looking for a timeout option... Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top