first we activate a "Workload Policies Definitions" that no Job is starting and running jobs can end.
"Workload Policies Definitions" is set with:
Job Name/Mem Name -> *
Running Jobs: 0 <on Each> All Days,All Hours
When no Jobs are running:
1) ctm_menu -> Activation Menu -> STOP ALL
2) root_menu -> Activation Menu -> STOP ALL
Now all Server and EM components are stopped, and you are able to update your server and restart.
Maybe your Server is set to start automaticly EM and CTM Server, you have to deactivate the "Workload Policies Definitions" and the sheduling will continued to run.
Otherwise you have to start EM and Server with console first.
To stop/start Control-M via CLI, so you can use it in a script, the commands are:
1. Stop Control-M/EM #run this as EM User
em ctl -mcs -C Config_Agent -all -cmd shutdown # this stops Control-M/EM on all hosts where it runs, for example, HA Primary and Secondary and on Workload Archiving host too (but you need to stop PGSQL on Workload Archiving host, if that's the DB used for WA: arc DBUStop -FORCE N)
2. Stop Control-M/Server (Secondary) #run this as CTM/Server User
3. Stop Control-M/Server (Primary) #run this as CTM/Server User
4. Start Control-M/Server (Primary) #run this as CTM/Server User
5. Start Control-M/Server (Secondary) #run this as CTM/Server User
6. Start Control-M/EM (Primary) #run this as EM User
7. Start Control-M/EM (Secondary) #run this as EM User
8. If you have Workload Archiving you first start PGSQL DB (if it uses PGSQL) and then the Config Agent: #run this as EM User
9. Start Control-M/Agent, run this as root (if agent runs as root) or as agent-user (if agent runs as non-root):
"<home of ctm/server>/ctm_agent/ctm/scripts/start-ag -u <ctm server user> -p ALL
NOTE1: you can setup auto-stop/start for all Control-M components using Linux rc.d and/or systemd facilities.
The documentation has the high-level commands but you would need to write the scripts: Control-M 126.96.36.199 Control-M Documentation - Control-M - BMC Documentation
NOTE2: In case the Oracle host is being rebooted too, you need to ensure that:
- Oracle is shutdown after Control-M applications are stopped
- Oracle is started before Control-M applications are started