Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I have a situation where I am writing a programme that runs a series of long running PHP scripts that can take anything from 20 minutes to 10 hours ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    1

    Finding apache process id that is spawned by a wget


    Hi,

    I have a situation where I am writing a programme that runs a series of long running PHP scripts that can take anything from 20 minutes to 10 hours to execute.

    I have a solution half implemented where I use via php exec(wget <location to command>) and get the process id back.

    This returns to PHP the process ID of the wget process. However what I'm looking for is to get the process ID of the apache process that wget starts and runs. However the apache process that is doing the work doesn't appear to be any relation to the wget process (eg the apache process isn't a child process of wget).

    What my question is - is there a way of determing the process Id of the apache process to send back to my php script for monitoring it ?

    Cheers.

    -mrploddy

  2. #2
    Just Joined! claudiu's Avatar
    Join Date
    Dec 2009
    Location
    Bucharest, Romania
    Posts
    16
    Why do you wanna monitor each apache worker?
    Why don't you simply monitor apache? Use monit for that, it even restarts apache in case it crashes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •