1

PHP Check if process is running (Linux)

view story
linux-howto

http://stackoverflow.com – i am trying to figure out if a gameserver is running. I found a lot of dirty methods so i wanted to make it basically easy by calling a php script which checks if a process is running. Well what i was trying was: <?php exec("bin_unix/linux_server", $output, $return); if ($return == 0) { echo "Ok, process is running\n"; } else { echo "Process is not running\n"; } but its not working (since i am sure the process is running).. its not a "real" process dont blame me i am not an linux expert :p so what i do to run this server is the following command: cd /path/to/server/ && (HowTos)