Re: Test if a daemon is running...
| From: | Dan Hardiker | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Test if a daemon is running... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95670@lists.php.net to get a copy of this message | ||
What type of daemon?
eg: To see if my pop3 daemon is running I use sockstat... "sockstat | grep
110" and process the output.
eg: To see if my mail redirect daemon is running I
check /var/run/red_mail.pid
All depends on what you want to do as to how you do it. You could even do
it in a multitude of ways and use the resulting matrix to determine.
--
Dan Hardiker [dhardiker@staff.firstcreative.net]
ADAM Software & Systems Engineer
First Creative Ltd
> Hello everybody,
>
> I would like to know an easy way to check is a daemon is running.
>
> What do you think is the best? Try to read a .pid file from the right
> directory? Use sockets function to try to connect to the listening port
> of the daemon? Grep the output of "ps -e" ?
>
> Thanks for your help !
>
> Gilles.