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?