Operating System - HP-UX
1752409 Members
5413 Online
108788 Solutions
New Discussion юеВ

Checking if a host is alive or dead

 
SOLVED
Go to solution
Chern Jian Leaw
Regular Advisor

Checking if a host is alive or dead

Hi,

I'm wanting to check if a host is alive. I've tried:
#ping hostname
PING hostname(180.30.500.11) from 180.30.67.119 : 56(84) bytes of data

It does not display the usual output of receving some number of bytes from that hostname, it's ttl, etc..

I've also tried doing an rsh :
#rsh hostname -l cjl04 ls -l
hostname: A remote hosts did not respond within the timeout period.

I've also tried telnet as a last resort - just for the fun of it, but it did not work.

Any other ways of determining if a host is alive or dead ??
10 REPLIES 10
S.K. Chan
Honored Contributor

Re: Checking if a host is alive or dead

Ping is already a basic connectivity check and if it doesn't respond to it there is no point trying connect to the system with telnet or remote shell. At the end of a succesful ping it'll report #packets sent, #packets received and #packet loss. Eg ..
# ping venus -n 5
.....
5 packets transmitted, 5 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0

Can your system ping to other machine ? If not you might want to check if it's properly routed.
# netstat -r

Also there is a similar kind of conectivity test program called "spray" that you can try but I don't se the point.
# man spray
for details.
Thayanidhi
Honored Contributor

Re: Checking if a host is alive or dead

You can also try "linkloop" to make sure whether the remote system connected to the network(Local network only). If "linkloop" dosn't respond then either it's cable disconnected or LAN interface card bad.

Attitude (not aptitude) determines altitude.
harry d brown jr
Honored Contributor

Re: Checking if a host is alive or dead

Chern,

have you tried the console?

Although telnet, ping, and remsh don't work, it doesn't mean the host is "dead", it could be that inetd died and needs to be restarted. The only way to restart it though is from the console - unless you have "modem" ports.


live free or die
harry
Live Free or Die
Chern Jian Leaw
Regular Advisor

Re: Checking if a host is alive or dead

harry,

How do I restart the host through the console? What are steps or commands involve?

Please guide me.
Thanks.
harry d brown jr
Honored Contributor

Re: Checking if a host is alive or dead

Chern,

Do you have Physical access to the computer? With the server, there is usually a console. When the console is turned on you should get some kind of response from pressing the return key a few times. let us know what you get.

live free or die
harry
Live Free or Die
SS_6
Valued Contributor

Re: Checking if a host is alive or dead

Hi,
If you have web console/LAN console than try to login through that.Even if host is down you can still go to GSP prompt and see the status and run many commands.
After connecting through web console press control B and enter. You will get GSP>
type he for help or you can reset the server by typing rs and enter.
By providing solutions I am helping myself
T G Manikandan
Honored Contributor

Re: Checking if a host is alive or dead

You can go ahead with the traceroute to check whether you could reach the system.
you can trace if there are problems with the network level.

Do a
#traceroute .


THanks
Stefan Schulz
Honored Contributor

Re: Checking if a host is alive or dead

Hi,

you could also use a portscanner on that server. Somethin like nmap (e.g. from http://hpux.asknet.de).

With the report of a portscanner you can see which ports/services are still alive and which are not.

Perhaps you can find an open port you can use to connect.

BTW: is this server behind a firewall? If yes forget about the portscanner and also about ping. Often firewalls even block ping requests.

Hope this helps


Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Steven Sim Kok Leong
Honored Contributor
Solution

Re: Checking if a host is alive or dead

Hi,

I would agree with with Thayanidhi that linkloop is the best utility to use if you are monitoring remotely but in the same subnet (or same VLAN).

This is because linkloop operates at layer 2 of the TCP/IP stack. Thus, even if layer 3 is unavailable i.e. IP address misconfigured or even no IP address configured resulting in ping or traceroute failure, the server can still be detected to be alive based on the linkloop test.

Hope this helps. Regards.

Steven Sim Kok Leong