Operating System - HP-UX
1846858 Members
9356 Online
110256 Solutions
New Discussion

Re: Test Server available

 
Ralf Buchhold
Regular Advisor

Test Server available

Hello
who known a script to test of the availability
of some servers or not.
I think output like this:
Server "Name" is ok
Server "Name" not found

Thank ypu
Ralf
6 REPLIES 6
KapilRaj
Honored Contributor

Re: Test Server available

for HOST host1 host2 host3 host4 host5
do
if `ping -c1 $HOST`
then
echo $HOST is available
else
echo $HOST is nopt available
fi


Regds,

Kaps
Nothing is impossible
Ralf Buchhold
Regular Advisor

Re: Test Server available

Thank you
but -c1 is a not know option

Ralf
KapilRaj
Honored Contributor

Re: Test Server available

ok i just ran it on my aix node. check the man pages for ping and there should be an option to re-strict number of packet counts ..

Sorry no access to an hpnode now

Regds,

Kaps
Nothing is impossible
Bharat Katkar
Honored Contributor

Re: Test Server available

Yes in HPUX :

# ping -n 5

this will send and receive 5 packets and terminate.

You can even control the packet size.

# ping -n 5

Regards,
Bharat

You need to know a lot to actually know how little you know
Bharat Katkar
Honored Contributor

Re: Test Server available

Ralf,
I see something like this on the link below:
"9 of 94"

http://forums1.itrc.hp.com/service/forums/publicProfile.do?userId=BR797975&forumId=1


You need to know a lot to actually know how little you know
G. Vrijhoeven
Honored Contributor

Re: Test Server available

Hi Ralf,

On behalf of Kapil,

ping -n 1

Regards,

Gideon