Operating System - HP-UX
1823356 Members
2860 Online
109654 Solutions
New Discussion юеВ

Any Ideas -- Checking client status.

 
Russ Hancock_1
Frequent Advisor

Any Ideas -- Checking client status.

I run a number of scripts that go around the client machines on our system doing different jobs.
The problem I have is when machines are switched off the script hangs, trying to connect.
In short is there a way to check whether a machine is up or not from the server, without waiting for the Connection Timeout message.

Thanks in advance.
Russ.
Russ
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: Any Ideas -- Checking client status.

Russ,

Ping?


Pete

Pete
PVR
Valued Contributor

Re: Any Ideas -- Checking client status.

Hi,

Why don't u ping the client machines and check???
#ping a.b.c.d(client ip address)
Don't give up. Try till success...
Dave Hutton
Honored Contributor

Re: Any Ideas -- Checking client status.

Can try adding in your script to:
ping server -n 1
and checking to see if you get 100% packetloss before continuing on.

Dave
RAC_1
Honored Contributor

Re: Any Ideas -- Checking client status.

ping machine for three pings only. check status and proceed.

ping -n3 host_name
if [ $? -ne 0 ]
then
echo "machine not available"
exit
There is no substitute to HARDWORK
Mark Grant
Honored Contributor

Re: Any Ideas -- Checking client status.

If you want to check if your remsh is going to work even if the machine is up. You need to do a test remsh with a timeout and then remsh again.

Attached is a perl script called remsh.pl that attempts to remsh but times out after 30 seconds.

call it with "remsh.pl host command"

Oh, and read the comments at the start :)
Never preceed any demonstration with anything more predictive than "watch this"