Command to stop/start Control M agent from remote system

Everything about Control-M agents installation or setup.
Post Reply
TRAVO

Command to stop/start Control M agent from remote system

Post by TRAVO » 05 Nov 2007 2:42

Hi,
We are in a position where we need to end/start agents running on different systems. Is there a way to do this via Command line job. I have Control M 6.2 and the agent is 6.1. There is a lot of maintenance on the server at different time and we would like a job to run to end the agents and when the maintenance is done the job can be run to start the agent. The command below was run but it did not start the agent back up I believe it is because the job resided on the server where the agent resides.

Start:

/usr/local/bin/CTMStart.sh

Stop:

/usr/local/bin/CTMStop.sh


Thanks,

User avatar
tux_dude
Nouveau
Nouveau
Posts: 13
Joined: 17 Sep 2007 12:00

Post by tux_dude » 05 Nov 2007 4:50

You can do this via remote shell. On my system, I use ssh with sudo to stop and start the agents.

To stop:
ssh ctmag@server 'sudo shut-ag -u ctmag -p ALL'

To start:
ssh ctmag@server 'sudo start-ag -u ctmag p ALL'

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Post by philmalmaison » 06 Nov 2007 9:46

thoses commands are located in $HOME/<agent>/ctm/scripts

so :

$HOME/<agent>/ctm/scripts/shut-ag -u <agent> -p all

$HOME/<agent>/ctm/scripts/start-ag -u <agent> -p all

you MUST use root owner to do it.

regards
Philmalmaison

Post Reply