We would like to check if a specified process is currently running via PHP.
We would like to simply supply a PID and see if it is currently executing or not.
$pid = 12345; if (shell_exec("ps ax | grep " . $pid . " | grep -v grep | wc -l") > 0) { // do something }