The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to know Any Process End Time? hanu_oracle Shell Programming and Scripting 2 04-09-2008 02:43 AM
Waiting time of Process chandrakala.sg AIX 4 09-25-2007 04:43 AM
what time did my process die ?? hcclnoodles SUN Solaris 3 10-20-2006 08:33 AM
How to choose Multiple process or Multiple threads? ashleykumar IP Networking 0 04-10-2006 07:30 AM
process time sathishkumar High Level Programming 1 09-12-2001 05:13 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-24-2008
lestat_ecuador lestat_ecuador is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 28
Exclamation how to run multiple process at the same time

Hello guys,

Look what im doing:

I need to run a process from a SERVER1 to SERVER2, SERVER3 and SERVER4.

The shell of the process is in each SERVER (2 to 4)

So from SERVER1 i do:

Code:
for i in SERVER2 SERVER3 SERVER4
do
rsh $i '
./process.sh
'
done
The problem is: each process.sh takes around 30 minutes so i have to wait 90 minutes to take the final result, my question is, how i can run the process.sh in the SERVER2, SERVER3 and SERVER4 at the same time? and i have to wait only 30 minutes?
  #2 (permalink)  
Old 06-24-2008
shamrock shamrock is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2007
Location: USA
Posts: 750
Add the -n option to rsh redirect its stdout to a file or /dev/null and put it in the background.

Code:
for i in SERVER2 SERVER3 SERVER4
do
    rsh $i -n '/path/on/remote/server/to/process.sh' > /dev/null &
done
  #3 (permalink)  
Old 06-24-2008
lestat_ecuador lestat_ecuador is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 28
Thanx that really works
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:16 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0