ctmlog

The ctmlog utility creates a report from entries in the Control‑M log or deletes entries in the Control‑M log.

Running the ctmlog Utility

This procedure describes how to run the ctmlog utility, which creates a report from entries in the Control‑M log or deletes entries in the Control‑M log.

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 one of the following commands:

    • ctmlog <action> <actionOption> \

      <fromDate> <fromTime> <toDate> <toTime> \

      [<output> [<reportWidth>] ]

    • ctmlog <action> <actionOption> "*" \

      [<output> [<reportWidth>] ]

For valid values for <action> and <actionOption>, see ctmlog Utility Actions.

For all other parameters in this utility, see ctmlog Utility Parameters.

ctmlog Utility Actions

The following table lists all actions are limited to log entries in the range specified using the time and date parameters.

Action

Description

Action Option

listss

Prints a report for a specific subsystem.

Subsystem to include in the report.

Specify one of the following subsystems:

  • SU Supervisor

  • TR Tracker

  • SL Selector

  • CD Download, Database update

  • NS Communication with Agent computers

  • LG Agent utilities

  • UT Utilities

  • WD Watchdog

list

Prints a report that lists all entries.

When running ctmlog in the list mode and there is a number between 1 to 48 following the list action, then ctmlog treats this number as the number of hours earlier than when the log was specified to be generated.

If this number is not within the range between 1 to 48, then the ctmlog utility expects the number to be either in the format yyyymmdd or yymmdd.

listord

Prints a report that lists all entries.

Order ID to include in the report.

The Order ID as displayed in the Job Details window of Control‑M/EM is a base 36 number. If you want to specify the Order ID here as a base 10 number, precede the number with an asterisk and enclose the result in quotation marks (for example, "*1234").

listjob

Prints a report that lists all entries for the specified job number.

Job number to include in the report.

listmsg

Prints a report of messages with a specific message ID.

Message ID to include in the report.

delete

Deletes entries in a specified date and time range.

None

listjobname

Prints a report that lists all entries for the specified job.

The name of the job whose entries are printed in the report.

ctmlog Utility Parameters

This table lists the parameters of the ctmlog utility:

Parameter

Description

<From Date>
<From Time>
<To Date>
<To Time>

Determine the start and end dates and times for the range of entries to be scanned by the specified action.

Date format: yyyymmdd

Time format: hhmm

"*"

Scans all entries in the Control-M log without regard to date or time.

<Output>

Defines the full path name to send the report to.

If this parameter is not specified, the output is routed to the default output device.

This parameter is not applicable for the delete action.

<Report Width>

Defines the number of columns to generate in the report.

Valid values: 80–132

Default: 80

This parameter can only be specified if the Output parameter is specified.

ctmlog Utility Example

The following are examples of ctmlog utility commands:

  • The following command produces a report of all entries in the Control-M log between 10:00 am, 12 March 2021 and 8:00 am, 14 March 2021. The report is printed to the rprt.txt file in 80-column format:

    ctmlog list 20210312 1000 20210314 0800 ~<controlm_owner>/ctm_server/user1/rprt.txt

  • The following command produces a report of all entries in the Control‑M log relating to downloads to the Control‑M/EM database and to Control‑M/Server database updates, without regard to date or time. The report is output to file gdrprt.txt in 132‑column format:

    ctmlog listss CD "*" ~<controlm_owner>/ctm_server/user1/gdrprt.txt 132