|
Home > Archive > Unix Programming > November 2007 > How can get process id of a process running on remote machine.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How can get process id of a process running on remote machine.
|
|
|
| Hi,
I have run a process on remote machine with system() call using "ssh
abc@host './process'".
Process is up and running on remote machine. Is there any way i can
find PID of a process running in remote machine. I couldnt do that
with system("ps -aef | grep process | awk....."), since we can't get
output of a command run using system() call. Can any one help?
Thnx in advance,
Sandeep
| |
| shakahshakah@gmail.com 2007-11-22, 1:23 pm |
| On Nov 22, 8:33 am, sandy <rayapudisand...@gmail.com> wrote:
> Hi,
>
> I have run a process on remote machine with system() call using "ssh
> abc@host './process'".
> Process is up and running on remote machine. Is there any way i can
> find PID of a process running in remote machine. I couldnt do that
> with system("ps -aef | grep process | awk....."), since we can't get
> output of a command run using system() call. Can any one help?
>
> Thnx in advance,
> Sandeep
Untried, but:
popen("ssh abc@host 'pgrep process'")
?
| |
|
|
|
|
|