View Single Post
Old 02-25-2003, 08:21 AM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
checking if a process exists

On my game servers, I have a stats program written in perl running in the background. It listens for log information that is sent from Half-Life.

Since the perl script runs in the background, it is difficult to determine if it is running unless I ssh in and execute:
Code:
ps aux |grep hlstats.pl
so now i want to make a script that i can view from a web page that verifies that the process is running.

here is how i start the script:
Code:
-nohup ./hlstats.pl &
i'd prefer to be able to do this all in php, however i haven't been able to get info back from an exec() command in php.

can anyone suggest what they think is the best way to accomplish this?
sde is offline   Reply With Quote