ctmagcln

The ctmagcln utility sends a request to a defined Agent or all available Agents to remove all outputClosed A tab in the job properties pane of the Monitoring domain where the job output appears that indicates whether a job ended OK, and is used, for example, with jobs that check file location. files and exit status files that are no longer required, which is determined by the Max. Days to Retain Output Files Control-M/Server system parameter, as described in Logging Parameters. This utility must run when the Control-M/Server is up.

The New DayClosed A Control-M process that begins every day at 7:00 AM, adds jobs and folders to the Run Queue for the day that is about to begin, and removes jobs and folders from previous days. process 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 set the AGENTS_CLEANUP_IN_NEWDAY Control-M/Server system parameter to N, as described in New Day Parameters, and run the ctmagcln utility.

You can run the ctmagcln utility as a daily job. A message is added to the IOALOG after Agent cleanup has completed.

Running the ctmagcln Utility

This procedure describes how to run the ctmagcln utility, which ends a request to a defined Agent or all available Agents to remove all outputfiles and exit status files that are no longer needed.

Begin

  1. Log in to the Control-M/Server host as the Control-M/Server owner.

  2. Run the following command:

    ctmagcln -Agent <"*" | AgentName> [-days <outputRetainDays>]

ctmagcln Utility Parameters

The following table describes the ctmagcln utility parameters.

Parameter

Description

*

Determines whether all Agents remove output files and exit status files that are no longer needed.

AgentName

Determines whether the defined 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 deletion.

Default: 1

BMC recommends running ctmagcln as soon as possible after the New Day procedure completes execution.

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 Agent saturn remove output files that have been retained for two days, and removes all exit status files that are no longer needed.

    ctmagcln -Agent saturn -days 2