HI Folks,
I need a shell scripts to shutdown servers A,B,C one after the other.Once server A is shutdown completely I need to start the shutdown of server B and once B is completely down then I need to start shutdown of C.
Does any one has any existing script of similar logic.
Thanks
Did you consider using Command Central for this work?
with shell scripts and SAGCC commands this is easy to implement,
especially when your IS instances are not at the same physical server.
You can use the SAGCC command to execute the lifecycle actions like STOP as well as you can use them in a loop to check the status to be really down.
In case you must be 110% sure that IS is down you can also use SAGCC commands to obtain a copy of the IS server.log file (or only few last lines of it) and check that IS confirmed even in the logs that it is down.
sagcc get diagnostics logs ( tail | head | full ) [(regex= | search=) ] [lines=]
sagcc get diagnostics logs [+…] export -o
sagcc get diagnostics logs [] export -o
sagcc exec lifecycle ( start | stop | restart | pause | resume ) [ []]
sagcc exec lifecycle ( start | stop | restart | pause | resume ) <searchParam1=value1>…
You might find especially the last option with the “<searchParam1=value1>” because you can use that to name your instances even like in your example “A”, “B” and “C” when starting and stopping. So you can implement layer/server independent commands.