Status of remote servers

hi,

Say me the command to check the status of server. whether its up or down

 
ping the server.

thats ok. is there any other command to say specific details about when server came down and other information

I Dont think so , since

 
is there any other command to say specific details about when server came down and other information 

If Server is down , obviosuly it can't giv you any feed back other than time out , how ever if it's up when you remotely login in or can do the remsh to get the "uptime" which will show from when the server is UP.

Thanks for your reply

can you say the command for checking the particular services and how can we find whether that service is up or down.
Consider http service. how to check whether its up or down

Are you looking for something like this ?.

 
remsh Remote_server_host_name ps -ef | grep "http" 

use

ps -ef |grep 

whether ps -ef| grep http will display the whether http service is up or down.

If service is down how it will display

If you get any output from the below command , it's means service is UP and running , otherwise NO.

remsh Remote_server_host_name ps -ef | grep "http" | grep -v "grep" 

thanks to panya, and deepaksahni0109
for replies

Or, to check open ports for a remote host, use nmap. For http, check if port 80 is open, like this:

jonas merzky ~/Mail/now/old : nmap www.google.com

Starting Nmap 4.53 ( http://insecure.org ) at 2010-02-19 00:20 CET
Warning: Hostname www.google.com resolves to 6 IPs. Using 74.125.155.103.
Interesting ports on px-in-f103.1e100.net (74.125.155.103):
Not shown: 1711 filtered ports
PORT    STATE  SERVICE
80/tcp  open   http
113/tcp closed auth
443/tcp open   https

Nmap done: 1 IP address (1 host up) scanned in 27.563 seconds

thanks andre for your post