Starting all the components simultaneously through script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Starting all the components simultaneously through script
# 1  
Old 03-24-2014
Wrench Starting all the components simultaneously through script

Hi Folks ,

I have the below script that will start the components one by one by giving an interval of few seconds that if first component is started then there is interval of
few seconds and then the second component is started , but by this way it takes time, i want to make the process faster so that all the components started simultaneously could you please advise how to achieve thisSmilie
Below is the script , also please advise can I put all the other components to run in background so that will also make process faster


Code:
# call to start the prime component first
./abe_de.sh start

# giving server a chance to get up and running ...

sleep 15
./abd_mahg1.sh start

# giving server a chance to get up and running ...

sleep 15

./abd_mahg2.sh start

# giving server a chance to get up and running ...

sleep 15

./abd_mahg3.sh start


Last edited by punpun66; 03-24-2014 at 12:00 PM..
# 2  
Old 03-24-2014
sleep command

You have the sleep commands.
To speed up, decrease the 15 option; or remove the sleep commands altogether.
# 3  
Old 03-24-2014
Quote:
Originally Posted by joeyg
You have the sleep commands.
To speed up, decrease the 15 option; or remove the sleep commands altogether.
Thanks joeyg can you also please advise how can I put other components to run as background process as I want the other components to put up as background process Smilie i think that will also improve the performance
# 4  
Old 03-24-2014
Quote:
Originally Posted by punpun66
Thanks joeyg can you also please advise how can I put other components to run as background process as I want the other components to put up as background process Smilie i think that will also improve the performance
Why would you think so? There's 15 seconds of blank space between you running things.... If you put them in background there will still be 15 seconds of wait.
# 5  
Old 03-24-2014
Quote:
Originally Posted by Corona688
Why would you think so? There's 15 seconds of blank space between you running things.... If you put them in background there will still be 15 seconds of wait.
@Corona well please try to understand I have remove the sleep command at all now , and i even want to modify to next step where i will have only first service running and the rest will be running in background , the motto is to make things faster Smilie
# 6  
Old 03-24-2014
What if one of the component fails to start?
# 7  
Old 03-24-2014
Quote:
Originally Posted by chacko193
What if one of the component fails to start?
@chacko yeah agreed so please advise shall I need to modify my script the above one even after removing the sleep command
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to grep a line not starting with # from a file (there are two lines starting with # and normal)?

e.g. File name: File.txt cat File.txt Result: #INBOUND_QUEUE=FAQ1 INBOUND_QUEUE=FAQ2 I want to get the value for one which is not commented out. Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies

2. Shell Programming and Scripting

Run 2 shell scripts simultaneously from one script

i Run 2 scripts on all of around 50 nodes every day. 1.Mod_1.sh 2.Mod_2.sh eg.. i run file with specific node no like Mod_1.sh NODE_(node number) Mod_2.sh NODE_(node number) I want to run both file by using single script with unique node number. Eg.. Mod_new.sh NODE_(node... (11 Replies)
Discussion started by: Ganesh Mankar
11 Replies

3. Shell Programming and Scripting

Shell script for running simultaneously two interfaces

Hi! I have two environments on a machine and each one has some scripts for checking if some interfaces are down, and if so, it restarts them. The issue now is that i cannot keep both interfaces running, on both environments i see the same process running. How can i modify my scripts in... (4 Replies)
Discussion started by: Jane_Doe
4 Replies

4. Shell Programming and Scripting

Redirect an output from a script to a file and display it at a console simultaneously

Hi, I'd like to redirect the STDOUT output from my script to a file and simultaneously display it at a console. I've tried this command: myscript.sh | tail -f However, it doesn't end after the script finishes running I've also tried this: myscript.sh | tee ~/results.txt But it writes... (3 Replies)
Discussion started by: wenclu
3 Replies

5. Shell Programming and Scripting

Help starting a script

Hi guys, i already search in this forum and i can't find a way to do this. I have a file like this: -1 1 lig -1 1 lig -1 1 lig -1 -1 dec -1 -1 dec -1 -1 dec -1 -1 dec -1 -1 dec -1 -1 dec And i need to compare the values of... (7 Replies)
Discussion started by: MetaBolic0
7 Replies

6. Shell Programming and Scripting

starting many child threads simultaneously

i have a parent process and 5 child process. As soon as the parent process is completed the 5 child processes need to start simultaneously (like multithreading) All I need to do in a shell script the child process is a function can any one help me on this thanks in advance (1 Reply)
Discussion started by: trichyselva
1 Replies

7. Shell Programming and Scripting

[Help] script how to run 2 commands simultaneously

#!/bin/sh firefox index.html firefox secondpage.html hey guys, im not able to open up two pages at the same time... it always open up index.html first, and only after i close it, then the 2nd page pops up... is there any way i can run both commands at the same time? i appreciate any... (2 Replies)
Discussion started by: funnyguy123
2 Replies

8. Shell Programming and Scripting

Starting script without ./ name or sh name

Hi, i want to start my script only by the name of it. $ scriptName normaly i have to use ./scriptName oder sh scriptName is there a way to do that in bash or sh ? (13 Replies)
Discussion started by: Turrican
13 Replies

9. Shell Programming and Scripting

how to make a bash script that can be executed by people simultaneously?

dear friends, i want to make a bash script that can be executed by many people simultaneously. do you have any idea to make it? there will be many dependent-variables(which is input from people) in the scripts. i am thinking about a random temporary file that created by the bash script each... (4 Replies)
Discussion started by: jimmbp
4 Replies

10. UNIX for Dummies Questions & Answers

Problem starting a script from a 'main'-script

Please Help! :o I have a main script (ksh) where another script is called (convert_picture). Normally this works ok, but since some changes has been made on the unix-server (I dont know what :( ) suddenly it doesnt work anymore: i get an error message: ksh: convert_picture not found. I am... (3 Replies)
Discussion started by: Rakker
3 Replies
Login or Register to Ask a Question