473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

remote process managing

Hi,

I am working on a project where I need to start processes on remote
machines, across mac, linux, windows from one server or 'manager'
machine.

For now, I only need to implement a 'wait' type command , so I can
wait for the remote machine to finish, everything is synchronized in
this respect.

I'm not sure the best way to do this. Currently, I will do a
popen2.Popen4 command to start the ssh command, example:

ssh user@hostname command arg1 arg2 ...

Then I do a Popen4.poll() and wait for it to finish.

The problem is if the process hangs, I can't end it. So I created a
python script on the remote machine (which i call in the ssh command)
which does a os.spawnv on the command, then i create a socket to send
its process id over. Once I receive it I can poll and if it takes too
long kill the remote pid, and my ssh session.

But, is there an easier way to do this? ssh is capturing the stdout,
stderr streams from the other process. Maybe I can create some type
of shared file instead? Any suggestions?

Thanks,
student
Jul 18 '05 #1
0 1462

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Roger | last post by:
I would like to get a list of running processes on a remote machine. How is this possible via VB.Net? Is it possible? Can someone point me in the right direction. thanks, rog
9
by: Etienne Charland | last post by:
Hi, there is an application running on a remote desktop (under Citrix ICA, but the same problem applies for RDC or PC Anywhere). Now, I want to send keys to the remote application from a local app....
1
by: JV | last post by:
It's great that the CLR gives us this cool EventLog object for managing event logs. And they even give you this cool property "MachineName" to allow you to deal with event logs on a remote...
7
by: Ctal | last post by:
What is the best way to have my windows app run a .bat file on a remote server? The .bat will need to run as an admin on the remote machine. Additonally I need for my windows app to wait for the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.