I am familiar with ps, this is how I am currently getting the process ID:

#!/usr/bin/perl -w
use strict;
my $pid = `ps -axo pid,ucomm |grep proxyd|cut -f 1 -d \"p\"`;


But I was wondering if anyone new another means of doing so.

Thanks.

-gomes

On Thu, 12 Dec 2002 13:24:20 +0530 Ramprasad A Padmanabhan
<[EMAIL PROTECTED]> wrote:

> man ps
> 
> B-E-G Gomes wrote:
> > 
> > Looking for a simple method of getting a
> single process ID (for a 
> > process such as syslogd) and store it in a
> scalar.
> > 
> > I've found a few methods of doing so but they
> haven't been pretty.
> > 
> > I'm taking suggestions :)
> > 
> > -gomes
> > 
> 
> 
> -- 
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to