function processExists($processName) {
$exists= false;
exec("ps -aux | grep -i $processName | grep -v grep | grep -v /bin/sh", $pids);
if (count($pids) > 1) {
$exists = true;
}
return $exists;
}
Created
May 22, 2017 03:23
-
-
Save khanhtran3005/52926182931a81efc07ea2919ebb0470 to your computer and use it in GitHub Desktop.
Check a process whether running for not using PHP
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment