Solved

Process list with PHP

Posted on 2006-11-22
4
431 Views
Last Modified: 2008-03-06
Hello there,

I have a php script calling a perl script with exec("/home/*/script.pl &");
Since this php script is frequently accessed, and the pl script executes slow processes, I need to know if the script.pl is running, so I can choose between run it again or not. Is there any way that a php script could have access to linux process list, or, even better, just check wheter a pl script is running or not?

Thanks
0
Comment
Question by:mafosil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Accepted Solution

by:
nishayr earned 125 total points
ID: 17995486
Hey there,

Maybe have the script create a '.scriptlockfile' or something when it starts, and remove that file when completing.

When the script starts, it can check for the existence of this file, and exit if the file exists and create the file and continue processing if the file is not there...

Thanks,
Nish
0
 

Author Comment

by:mafosil
ID: 18007567
I have it as my backup solution, but what I really want is a solution that I dont need to do this kind of 'trick' thou that's what I'll do if nothing comes up.

Thanks :)

Marcelo Silveira
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
The viewer will learn how to implement Singleton Design Pattern in Java.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question