For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > March 2006 > Finding a process in *nix









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Finding a process in *nix
Rob W.

2006-03-20, 3:56 am

Heres what i'm trying to do.

$proc=exec('ps aux | grep proc');

if ($proc != "") {
echo "True";
}
if ($proc == "") {
echo "False";
}

but some time's it show's the ps aux so I dont get a true reading. Anybody have a way that I might be able to extract this out of there to get a true reading to find out if the process is running?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com