script to remotely start several applications and instances


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users script to remotely start several applications and instances
# 8  
Old 02-02-2011
My servers are running on different environment (application instances: sun java, glassfish etc web instances, database: oracle, postgre, informix). All of them have their own restart script on the individual servers.

Im thinking of doing this logic (actually this project is required by my bossSmilie]

a. on the centralized host, script that will ssh remotely to all the servers and point to the path where the restart script resides).

The support admin (not unix admin) will then have a menu choices like. Restart a. server1 b. server2 c. server3 so on......
So if I choose letter a, I will still have a choice to restart a. application b. web c.database. I will choose say letter a. Like that.

Do you recommend that logic?
# 9  
Old 02-03-2011
Yea it will work. I have some menu's like that. And the looping down to lower menu's and then back up will take some logic. The call-out with ssh you will probably need sudo so that the script that you call can do the sudo su - <user id> -c "<command to run>" type thing. And the global user that will be coming from the central server will have to be auth keyed for login.
# 10  
Old 02-14-2011
what is that? can you provide a template for my guide?

---------- Post updated 02-15-11 at 08:34 AM ---------- Previous update was 02-14-11 at 09:56 PM ----------

what is a wrapper? do you have any template that I can use as a guide?

---------- Post updated at 08:35 AM ---------- Previous update was at 08:34 AM ----------

just wanted to ask if anybody have script template for the subject above so I can make ti as my guide? example

a. server 1.1.1.1: restart script located at /etc/init.d/glassfish.sh
b. server 2.2.2.2: central script that support admin will use to execute to restart the /etc/init.d/glassfish.sh at server 1.1.1.1

note: rlogin, telnet, rsh disabled. server 2.2.2.2 can only ssh 1.1.1.1 asking for login pw.

any ideas so I can make it as my guide? I will create a central script as per my old thread to remotely restart several application instances (like glassfish, sun java etc).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Display status of instances in apache - Where to start

Hello, I know this is not a simple question so I just need to know where to start for below project: I am running under Ubuntu 18.04 What I'd like to see in apache page is to display status of particular process pids. ps aux | grep keywords.txt keywords.txt word1 word2 word3 word4... (9 Replies)
Discussion started by: baris35
9 Replies

2. Solaris

How to remotely start ssh on Solaris?

Hi everyone, I have a Solaris machine: SunOS 5.10 Generic_127127-11 sun4v sparc SUNW,SPARC-Enterprise-T5220 After reboot, I can't ssh to this machine. Error message: ssh: connect to host xxxx port 22: Connection refused It seems ssh daemon is not running, but I don't have... (5 Replies)
Discussion started by: Zaiwen Gong
5 Replies

3. Shell Programming and Scripting

How to run multiple instances of shell script in linux?

How we can run the multiple instances of the script? I need to run the script which I am calling from the below function.I can doit with cron but I don't want to put it in the cron.This cript dploy the build and here I want when the build stage then it should run with multilpe instances of... (6 Replies)
Discussion started by: anuragpgtgerman
6 Replies

4. UNIX for Advanced & Expert Users

script to remotely start an application instance

just wanted to ask if anybody have script template for the subject above so I can make ti as my guide? example a. server 1.1.1.1: restart script located at /etc/init.d/glassfish.sh b. server 2.2.2.2: central script that support admin will use to execute to restart the /etc/init.d/glassfish.sh... (0 Replies)
Discussion started by: lhareigh890
0 Replies

5. Shell Programming and Scripting

Want to have delay in multiple instances of the same shell script

Hello, My goal is to run the same Shell script in a parallel mode. This script will get triggered from different machines and different application teams by some job scheduling tool. They may trigger the process at the same time. so I want to have them in QUEUE ..and release them for execution on... (3 Replies)
Discussion started by: chetan_sonar
3 Replies

6. Shell Programming and Scripting

Get the STATE of the weblogic instances via shell script.

Can I get the STATE(instance are RUNNING or not and HEALTH is OK or not) of the weblogic instances(Admin and Managed) running on my unix machine via shell script. Someone told me that it can be done via "weblogic.Admin GETSTATE"....but it is not working for me(might be I am doing something wrong)... (2 Replies)
Discussion started by: joshilalit2004
2 Replies

7. Shell Programming and Scripting

Multiple instances of the job in shell script.

Hi, Please let us know how to create a multiple instances of a job in the shell script. Thanks. Gangegowda K.G (1 Reply)
Discussion started by: Gangegowda
1 Replies

8. Shell Programming and Scripting

Script that checks for previous instances running

Hello, I'm trying to write a script that checks for previous instances of the same script which may still be running (this script is scheduled to run every 30 minutes). I want to somehow use the pid from each instance to make sure the previous one isn't running before continuing with my... (5 Replies)
Discussion started by: bd_joy
5 Replies

9. UNIX for Advanced & Expert Users

reg no of instances of a script run using cron

I have the below code in a file called test.ksh and it is scheduled using cron forevery 5 min. when i see the cron out file for every 5 min it showing the no of process running are 2. same thing when i implement in another script which contains other code along with the below code , it showing as... (1 Reply)
Discussion started by: kamesh83
1 Replies

10. Shell Programming and Scripting

How to limit the number of running instances of a script?

I would like to allow only one instance of a script to run at any moment. I've tried the following solution to count the instances but the result is always the number of running instances plus one and I can't find the problem ps -ef | grep $0 | sed '/^$/ d' | sed '/grep/ d' | wc -l Please... (2 Replies)
Discussion started by: oti
2 Replies
Login or Register to Ask a Question