Share This:

One thing we've been having some conversations with customers about is how easy or hard it is to start or stop TSSA.  While you can use TSSA to start or stop any other application, how do you restart your favorite automation application in an orderly fashion?  How do you start it as fast as possible, while still catching all of the hosts?

 

So, we wrote a script for that, that you can use to cleanly shut down, and cleanly start up your environment, in the same order, every time.  This will also make it easier to make the same appserver the leader (does job and workitem distribution) every time.

 

That script is now on Github, in the Remediate section, as remediate/app-control.nsh at master · bmcsoftware/remediate · GitHub .  Feel free to comment there or hjere, or reach out via email, Telegram, or TikTok.

 

Here's typical usage:

 

# nsh app-control.nsh usage

Usage: app-control.nsh {start|stop|restart|status|restart-leader}

#

 

server1# nsh app-control.nsh restart

=======================

Stopping app servers

=======================

Stopping blappserv blprocserv on server3

Stopping TrueSight Server Automation AppServer ... All appserver processes have been terminated successfully.

Stopping TrueSight Server Automation ProcessSpawner ... OK

Stopping blappserv blprocserv on server2

Stopping TrueSight Server Automation AppServer ... All appserver processes have been terminated successfully.

Stopping TrueSight Server Automation ProcessSpawner ... OK

Stopping leader server server1

Stopping blappserv blprocserv on leader server server1

Stopping TrueSight Server Automation AppServer ... All appserver processes have been terminated successfully.

Stopping TrueSight Server Automation ProcessSpawner ... OK

Done stopping leader app server, another server will get elected leader

... and stop-leader will no longer apply...

=======================

Done stopping app servers

=======================

=======================

Starting up app servers

=======================

Starting blappserv blprocserv on leader server server1

Starting TrueSight Server Automation AppServer ... OK

Starting TrueSight Server Automation ProcessSpawner ... OK

Done starting leader app server

Waiting 60 sec for head start

Starting blappserv blprocserv on server2

Starting TrueSight Server Automation AppServer ... OK

Starting TrueSight Server Automation ProcessSpawner ... OK

Starting blappserv blprocserv on server3

Starting TrueSight Server Automation AppServer ... OK

Starting TrueSight Server Automation ProcessSpawner ... OK

=======================

Done starting app servers

=======================

server1#

 

 

 

 

 

 

 

 

server1# nsh app-control.nsh status

=======================

Checking for number of Appserver Processes on each appserver

=======================

Checking server1, count of appserver processes: should be 1 or more if running...

       1

Checking server1, count of launcher processes: should be 1 or more if running...

       1

All java processes (more than one is fine):

bladmin  18051 18041  7 16:57 ?        00:00:06 /opt/bmc/bladelogic/NSH/br/java/

bladmin  18103 18094 10 16:57 ?        00:00:09 /opt/bmc/bladelogic/NSH/br/java/

bladmin  18138 18051 79 16:57 ?        00:01:05 /opt/bmc/bladelogic/NSH/br/java/

bladmin  18774 18768 30 16:58 ?        00:00:08 /opt/bmc/bladelogic/NSH/br/java/

bladmin  18891 18883 37 16:58 ?        00:00:09 /opt/bmc/bladelogic/NSH/br/java/

Checking server2, count of appserver processes: should be 1 or more if running...

       1

Checking server2, count of launcher processes: should be 1 or more if running...

       1

All java processes (more than one is fine):

bladmin  18051 18041  7 16:57 ?        00:00:06 /opt/bmc/bladelogic/NSH/br/java/

bladmin  18103 18094 10 16:57 ?        00:00:09 /opt/bmc/bladelogic/NSH/br/java/

bladmin  18138 18051 79 16:57 ?        00:01:05 /opt/bmc/bladelogic/NSH/br/java/

bladmin  18774 18768 30 16:58 ?        00:00:08 /opt/bmc/bladelogic/NSH/br/java/

bladmin  18891 18883 37 16:58 ?        00:00:09 /opt/bmc/bladelogic/NSH/br/java/

Checking server3, count of appserver processes: should be 1 or more if running...

       1

Checking server3, count of launcher processes: should be 1 or more if running...

       1

All java processes (more than one is fine):

bladmin  18051 18041  7 16:57 ?        00:00:06 /opt/bmc/bladelogic/NSH/br/java/

bladmin  18103 18094 10 16:57 ?        00:00:09 /opt/bmc/bladelogic/NSH/br/java/

bladmin  18138 18051 79 16:57 ?        00:01:05 /opt/bmc/bladelogic/NSH/br/java/

bladmin  18774 18768 30 16:58 ?        00:00:08 /opt/bmc/bladelogic/NSH/br/java/

bladmin  18891 18883 37 16:58 ?        00:00:09 /opt/bmc/bladelogic/NSH/br/java/

server1#