srinivasan srinivas schrieb:
Thanks a lot.
But i am wondeing will it return correct pid if more than one instance of
run on the remote machine??
Thanks,
Srini
On UNIX-like OS:
If you start the process in the background, you can
get the PID with:
:~> ssh 'ls -l & echo PID=$!' | grep PID
PI
On Mon, Aug 18, 2008 at 9:34 AM, srinivasan srinivas wrote:
> Could you please suggest me a way to find pid of a process started on a
> remote machine by the current process??
If ps + grep (or the more robust tool pgrep) won't work because you're
running more than one instance at once, try this:
srinivasan srinivas wrote:
> Thanks a lot.
> But i am wondeing will it return correct pid if more than one instance of
> run on the remote machine?? Thanks,
What do you *think*? How about *trying* that out first?
Diez
--
http://mail.python.org/mailman/listinfo/python-list
etting pid of a remote process
srinivasan srinivas wrote:
> This is wat i am doing :
>
> args = [ "SSH", , ]
> I am giving this to subprocess.Popen()
> Thanks,
> Srini
Then the answer is simple: how would you figure out the remote process pid
using ssh? Once you found
srinivasan srinivas wrote:
> This is wat i am doing :
>
> args = [ "SSH", , ]
> I am giving this to subprocess.Popen()
> Thanks,
> Srini
Then the answer is simple: how would you figure out the remote process pid
using ssh? Once you found that out, pass that to Popen. Make sure you
capture stdou
This is wat i am doing :
args = [ "SSH", , ]
I am giving this to subprocess.Popen()
Thanks,
Srini
- Original Message
From: Diez B. Roggisch <[EMAIL PROTECTED]>
To: python-list@python.org
Sent: Tuesday, 19 August, 2008 12:26:20 PM
Subject: Re: Getting pid of
> From: Diez B. Roggisch <[EMAIL PROTECTED]>
> To: python-list@python.org
> Sent: Monday, 18 August, 2008 9:23:20 PM
> Subject: Re: Getting pid of a remote process
>
> srinivasan srinivas schrieb:
> > Hi,
> > Could you please suggest me a way to find pid of a
srinivasan srinivas schrieb:
HI,
I am using Solaris and subprocess.Popen to spawn a process on a remote machine.
No, you are *not* doing that. You are maybe using subproces to run SSH
to spawn a remote process. Why don't you *show* us how you actually do that?
DIEZ
--
http://mail.python.org/
HI,
I am using Solaris and subprocess.Popen to spawn a process on a remote machine.
Thanks,
Srini
- Original Message
From: Diez B. Roggisch <[EMAIL PROTECTED]>
To: python-list@python.org
Sent: Monday, 18 August, 2008 9:23:20 PM
Subject: Re: Getting pid of a remote process
srin
srinivasan srinivas schrieb:
Hi,
Could you please suggest me a way to find pid of a process started on a remote
machine by the current process?? I should get pid in the current process
environment. The approach should be somewhat generic. It shouldn't expect the
remote process to print its pid
Hi,
Could you please suggest me a way to find pid of a process started on a remote
machine by the current process?? I should get pid in the current process
environment. The approach should be somewhat generic. It shouldn't expect the
remote process to print its pid.
Thanks,
Srini
Unlimit
11 matches
Mail list logo