How can get process id of a process running on remote machine.
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > How can get process id of a process running on remote machine.




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    How can get process id of a process running on remote machine.  
sandy


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-22-07 06:23 PM

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





[ Post a follow-up to this message ]



    Re: How can get process id of a process running on remote machine.  
shakahshakah@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-22-07 06: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'")

?





[ Post a follow-up to this message ]



    Re: How can get process id of a process running on remote machine.  
sandy


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-23-07 06:35 AM

Thnx, It works






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:57 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register