[NTLUG:Discuss] Script request

Ed Leach ntlug at levelofdetail.com
Mon Mar 2 16:09:37 CST 2009


Fred wrote:
> Has anyone got a script that cron could run to see if 
> a server is up and running? I just found out that a webserver
> over in the corner has been sitting there for 4 days waiting
> for someone to get the driver CD out of the drive and let
> it boot. This was after the power company ran down the 
> battery in the UPS unit. (well, not really, but you know...)
> 
> I guess a simple ping test would work, since if it is up enough
> for the networking, then the rest is probably running, too.
> That would be better than now, which is nothing.
> 
> Thanks,
> Fred

-------------------------

This usage of wget only lets you know if a page can be reached. Does not 
  even download it:

    wget --spider http://www.testdomain.com/index.html

returns "200 OK" or "ERROR 404: Not Found" server message string

and exit status of 0 or 1.

Ed




More information about the Discuss mailing list