ctm_agstat

The ctm_agstat utility enables you to list or update the status of an Agent. For more information, see communication status of Agents and remote hosts in Component management.

Running the ctm_agstat Utility

This procedure describes how to run the ctm_agstat utility, which enables you to list or update the status of an Agent.

Begin

  1. Do one of the following:

    • UNIX: Log in to a Control-M/Server account.

    • Windows: Open a command prompt window where Control-M/Server is installed.

  2. Type the following command:

    ctm_agstat

    { -LIST <AgentName> | -UPDATE <AgentName> {AVAILABLE | DISABLED} |-TAGS | -AGENTS_TAG <tagName> | -LIST_WITH_TAGS | -LIST_WITH_NO_TAGS | -UPDATE_TAG <AgentName> <tagName>}

    [ -DEBUG <debug level 1-5> ]

    [ -QUIET ]

ctm_agstat Parameters

The following table describes the parameters of the ctm_agstat utility:

Parameter

Description

-LIST

Lists the current status of the specified Agent.

For all Agents, use * (asterisk).

This parameter is mandatory if the -UPDATE parameter is not specified.

-UPDATE

Changes the status of the specified Agent to the specified status.

This parameter is mandatory if the -LIST parameter is not specified

The permissions of the AGSTAT directory must be modified to allow access to users who will run the ctm_agstat utility with the -UPDATE parameter.

  • <AgentName>: Host name of the Agent to be listed or updated. This name must be specified for ‑LIST and -UPDATE parameters.

  • AVAILABLE: Status where Control-M/Server is able to communicate with the specified Control-M/Agent.

  • DISABLED: Status where Control-M/Server does not attempt to communicate with the specified Control‑M/Agent.

-TAGS

Lists all Agent tags.

An Agent tag is a logical name that is used to label specific Agents in a group that has a specific authorization level.

-AGENTS_TAG

Lists the Agents that are associated with the specified tag.

-LIST_WITH_TAGS

Lists all Agents that are associated with tags. For each Agent, the associated tag is indicated.

-LIST_WITH_NO_TAGS

Lists all Agents that are not associated with tags.

-UPDATE_TAG

Associates the specified Agent to a tag that you specify.

-DEBUG <debug level>

Sets the required diagnostic level.

Valid values: 0 - 5

-QUIET

Indicates that the utility runs without displaying output messages.

ctm_agstat Examples

The following are examples of the ctm_agstat utility commands:

  • To display the current status of Agent CMAgent, type:

    ctm_agstat -LIST CMAgent

  • To change the status of Agent CMAgent to DISABLED, type:

    ctm_agstat -UPDATE CMAgent DISABLED

  • To list Agents that are associated with tags, type:

    ctm_agstat -LIST_WITH_TAGS

    The following response is returned:

    DEVAgent belongs to tag 'tag2'

    CMAgent belongs to tag 'tag1'

  • To associate Agent CMAgent with tag 'tag2', type:

    ctm_agstat -UPDATE_TAG CMAgent tag2