ctmagcln
The ctmagcln utility sends a request to all available Control-M/Agents (or to a specified Control-M/Agent) to remove all output files and exit status files that are no longer required, which is determined according to the Maximum Days to Retain Output Files parameter.
This utility should run while Control-M/Server is up and running.
For more information, see the description of the Output parameters parameter.
The New Day procedure can request that Agents remove OUTPUT files and exit status files that are no longer needed. In an environment with multiple Agents, it can take a long time to send the clean up request to the Agents during New Day. BMC recommends that you use the AgentS_CLEANUP_IN_NEWDAY configuration parameter to disable this action during the New Day procedure, and instead use the ctmagcln utility. For more information, see the description of the Configuration parameters configuration parameter.
The ctmagcln utility can be run as a daily job. A message is added to the IOALOG when the clean up of the Agents has ended.
Running the ctmagcln Utility
This procedure describes how to run the ctmagcln utility, which ends a request to all available Control-M/Agents, or to a specified Control-M/Agent, to remove all OUTPUT files and exit status files that are no longer needed.
Begin
-
Log in to the Control-M/Server computer as the Control-M/Server owner.
-
Enter the following command:
ctmagcln -Agent <"*" | AgentName> [-days <outputRetainDays>]
ctmagcln Utility Parameters
The following table describes the parameters of this command:
Parameter |
Description |
---|---|
* |
Specifies that all Agents remove OUTPUT files and exit status files that are no longer needed. |
AgentName |
Specifies that the specified Agent must remove OUTPUT files and exit status files that are no longer needed. |
outputRetainDays |
Specifies the number of days that OUTPUT files must be retained before being removed. Default: 1 |
BMC recommends running ctmagcln as soon as possible after the New Day procedure is complete.
ctmagcln Utility Example
The following are examples of the ctmagcln utility commands:
-
The following command requests that all Agents remove OUTPUT files and exit status files that are no longer needed.
ctmagcln -Agent "*"
-
The following command requests that the specified Agent, saturn, removes OUTPUT files that have already been retained for two days, and removes all exit status files that are no longer needed.
ctmagcln -Agent saturn -days 2