Posted by Tim Hunt on 08/11/06 13:41
benson_james@yahoo.com wrote:
> Hi folks,
>
> Im trying to write a simple php script. Basically all i want it to do
> is detect if a process is running or not then just set a variable to
> Running or Stopped.
>
> Its running on linux, ive already written one for for some processes
> that leave pid files but this daemon doesnt leave a pid file.
>
> Can anyone help please. Thanks
exec('pidof processname') will return the id of a running process, if
there's more then one of the process it returns a list of ids separated
by spaces.
Regards
Tim
[Back to original message]
|