How can I start/stop Agents remotely from the command line of a server?

Document ID : KB000053612
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

The command line available to remotely start/stop Agents is the servicectrl command, which is located in the $AGENTWORKS_DIR\services\bin directory.

For Agents to accept remote commands, you must configure the access.cfg to allow access. This file is located in the $AGENTWORKS_DIR\services\config\aws_orb directory.

For the command to function you also need the "awservices" process to be started on the Agent system. If the awservices process was shut down, the command will not function because it talks to the awservices process when controlling an Agent.

For more information about the servicectrl command, see CA Reference, a WinHelp guide provided with the product media as Online Books.

Solution:

The servicectrl command has several parameters available, which includes the following:

<install|installauto|remove|status|version|pid|start|stop|list>
--name=<agent name>
--instance=<instance name>
--remote=<hostname or IP>

For example, to stop the Windows System Agent (caiWinA3) on a remote host, from a server's command line, enter the following command:
servicectrl stop --name=caiWinA3 --remote=<hostname or IP>