Running RSH on the background


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Running RSH on the background
# 1  
Old 06-02-2008
Running RSH on the background

Hi,

I am developing a script that would do a 'rsh' on a client machine.

I want to invoke a script in client machine which would keep on polling data to the server.

I want the rsh to return back once it invoked the script on client and the script should run on background on client.

I have to comeback and start a script on server which would collect the data.

Right now, when I do an 'rsh' on client machine, I am stuck there with client polling the data. I couldn't come back and start the script on the server.

can someone help me with this?

Thanks,
Sundeep
# 2  
Old 06-02-2008
Once you're on the remote host
Code:
echo "/path/to/command/start_collecting_data" | at now

# 3  
Old 06-02-2008
As you are running the polling command as a background process, adding an "exit 0" statement in the script will solve the problem.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

RSH: Running out of ports

I have an issue where I am running out of ports when using RSH to start a script remotely. I have a script that i need to run that has been pushed out to every server. I have a list of servers (hostfilelist) Basically, I have a simple loop that will run them in paralell. for host in `cat... (1 Reply)
Discussion started by: nitrobass24
1 Replies

2. Shell Programming and Scripting

RSH connection problem while running MPI program

I'm trying to run MPI programs on 8 machines, but I get the error connect to address 127.0.0.1 port 544: Connection refused Trying krb4 rsh... connect to address 127.0.0.1 port 544: Connection refused trying normal rsh (/usr/bin/rsh) lagrid02: Connection refused When I run it with a... (8 Replies)
Discussion started by: vishwamitra
8 Replies

3. Shell Programming and Scripting

Running in background

Hello, I was trying to make some processes to run at background and went to a problem. First I tried just to loop in one line something like this: for i in {1..10}; do echo 'hello world' &; done; but it pops a syntax error, so I tried several ways to fix it but wasn't able to understand... (2 Replies)
Discussion started by: Rash
2 Replies

4. Solaris

Can i bind to a local login terminal running using rsh or remotely

Hi Can i ask? I had multiple solaris workstation running and some local users using it. Is it possible to bind to the local user terminal or console he's using as if like the user well type and I can see it and what my typing in the local user see it also. Is it possible.. Thanks. (3 Replies)
Discussion started by: jao_madn
3 Replies

5. Shell Programming and Scripting

running in background

i have a script called server.sh. how to run this script in backgroung using nohup command (5 Replies)
Discussion started by: ali560045
5 Replies

6. Shell Programming and Scripting

Error while running rsh commands !!!

Hi All I am trying to run an RSH command remotely to a machine, but I am gettinf the following errors, can anyone help me to resolve the errors user@server10:~> rsh user@server24 'uname -n' rcmd: getaddrinfo: Temporary failure in name resolution Thanks in advance to all Chirantan (3 Replies)
Discussion started by: csaha
3 Replies

7. Shell Programming and Scripting

running multiple rsh command in a script

hi scripting experts, juz wondering if it's possible to have multiple rsh command in a single script? :confused: ie: rsh -l <username> "<command>" rsh -l <username> "<command>" thanks. regards, wee :) (0 Replies)
Discussion started by: lweegp
0 Replies

8. UNIX for Dummies Questions & Answers

Script to kill rsh processes running for more than 10 mins

Hi Friends, I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance. Thanks&Regards, Amit (3 Replies)
Discussion started by: amitsayshii
3 Replies

9. Shell Programming and Scripting

script to kill rsh processes running for more than 10 minutes

Hi Friends, I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance. Thanks&Regards, Amit (1 Reply)
Discussion started by: amitsayshii
1 Replies

10. UNIX for Advanced & Expert Users

script to kill rsh processes running for more than 10 minutes

Hi Friends, I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance. Thanks&Regards, Amit (1 Reply)
Discussion started by: amitsayshii
1 Replies
Login or Register to Ask a Question