Finding a process in *nix
am 20.03.2006 09:22:05 von Rob
------=_NextPart_000_01C6_01C64BC5.14D63160
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Heres what i'm trying to do.
$proc=3Dexec('ps aux | grep proc');
if ($proc !=3D "") {
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?
------=_NextPart_000_01C6_01C64BC5.14D63160--
Re: Finding a process in *nix
am 20.03.2006 15:33:54 von Bogdan Surdu
Hi,
On 3/20/06, Rob W. wrote:
> Heres what i'm trying to do.
>
> $proc=3Dexec('ps aux | grep proc');
>
Try 'ps aux | grep proc | grep -v grep' to remove your grep process
from the list.
Tim
---
Living is easy with the eyes closed.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Finding a process in *nix
am 20.03.2006 15:43:28 von Ludvig Ericson
How about not posting this to the database related list?
On 3/20/06, Bogdan Surdu wrote:
> Hi,
>
> On 3/20/06, Rob W. wrote:
> > Heres what i'm trying to do.
> >
> > $proc=3Dexec('ps aux | grep proc');
> >
>
> Try 'ps aux | grep proc | grep -v grep' to remove your grep process
> from the list.
>
> Tim
> ---
> Living is easy with the eyes closed.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php