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):

  1. cron shell script generate stats.html or stats.txt
  2. php's shell_exec (could run ps |grep... example) or exec
  3. php's variety of posix functions may (http://php.net/manual/en/ref.posix.php)
  4. 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

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -