Re: Checking Server Status with PHP

From: Lord Hasenpfeffer (mykec-nospam_at_spamsucks-ionet.net)
Date: 01/28/05


Date: Fri, 28 Jan 2005 17:53:14 GMT

Sypher wrote:
> "Andrew @ Rockface" <andrew@rockface-records.co.uk> ha scritto nel messaggio
> news:ctdd6p$o9k$1@titan.btinternet.com...
>
>>Sypher wrote:
>
>
>>>$server = "apache";
>>
>>$up = `ps ax | grep "$server" | grep -v "grep"`;
>>if ($up != "") {echo "$server is up:<pre>$up</pre>";}
>>else {echo "$server is down:<pre>$up</pre>";}
>>
>
>
> Thanks man, i didnt tought of that one LoL :)
> I'm so noob ;P

Shouldn't that read:

$server = "httpd";

...though?

Myke



Relevant Pages