No Mystik he did not mean own PID he meant PID of any process

the only way you can do it is with ps or send a mail to a unix group for better ideas

I always do this

chomp($PID = `ps -ax |grep -v grep |grep $PROCESS | awk '{print $1}'`);


Mystik Gotan wrote:
#!usr/bin/perl -wT

use strict;

print("$$");

OR

#!usr/bin/perl -wT

use strict;
use English;

print "$PID"; # or $PROCESS_ID. English.Pm simply changes a system variable into an english word..



--------------
Bob Erinkveld (Webmaster Insane Hosts)
www.insane-hosts.net
MSN: [EMAIL PROTECTED]





From: <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Ramprasad A Padmanabhan <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED], B-E-G Gomes <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: obtaining a process ID.
Date: Thu, 12 Dec 2002 07:32:33 -0500

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]


_________________________________________________________________
Ontvang je Hotmail & Messenger berichten op je mobiele telefoon met Hotmail SMS http://www.msn.nl/jumppage/


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

Reply via email to