Connecting Tech Pros Worldwide Forums | Help | Site Map

Re: Getting pid of a remote process

Kurt Mueller
Guest
 
Posts: n/a
#1: Aug 19 '08
srinivasan srinivas schrieb:
Quote:
Thanks a lot.
But i am wondeing will it return correct pid if more than one instance of <scriptnamerun on the remote machine??
Thanks,
Srini
On UNIX-like OS:

If you start the process in the background, you can
get the PID with:

<myhost>:~ssh <remotehost'ls -l & echo PID=$!' | grep PID
PID=30596
<myhost>:~>



see:
man bash
-Special Parameters



Grüessli
--
Kurt Müller, mu@problemlos.ch


Closed Thread