Hi -

Yes, I agree ps -aux.

To do it from perl, use bacticks:

#!c:\perl\bin\perl -w

use strict;

my @processes = `ps -aux`;

print "$_" for @processes;

@processes has _everything_ about your currently
running processes (depenging on your permission
level).

Aloha => Beau.

-----Original Message-----
From: Guy Davis [mailto:guy@;yournaturewithin.com]
Sent: Wednesday, October 30, 2002 9:48 AM
To: [EMAIL PROTECTED]
Subject: Grabbing a process ID


If I'm using the system command on a linux box is there any way to get the
process id returned?

I am calling another perl script and it has failed occasionally from errors
that I have not yet tracked down. What I want to do is grab and store the
process id. Then check to see if that process id is still running at a later
date when the script is re-run.

Another question is there a way to grab the currently running processes on a
linux system and parse through them in perl? Has anyone done this or do you
know where I might get the code to do this?

Thanks

Guy Davis


--
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