apache - How can I generate a web page that checks the status of a process or service? -
i have dedicated server runs few lightweight game servers. server running apache. cheap , server hardware not robust , not servers use run concurrently. want able generate web page /stats has info like:
game 1: online <uptime> game 2: offline ...etc i'm run script using cronjob uses ps + grep logged file, , parse file information on server i'm looking more dynamic option checks page generated.
you have @ least few options (other people may have additional suggestions beyond listed here):
- cron shell script generate stats.html or stats.txt
- php's
shell_exec(could runps |grep...example) orexec - php's variety of
posixfunctions may (http://php.net/manual/en/ref.posix.php) - if have perl available there may few options there well
my suggestion evaluate shell_exec or exec before of others.
if need additional assistance please post have tried , results.
Comments
Post a Comment