Some help with a php script..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • benson_james@yahoo.com

    Some help with a php script..

    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

  • Tim Hunt

    #2
    Re: Some help with a php script..


    benson_james@ya hoo.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

    Comment

    Working...