emmftcli

The emmftcli utility enables you to search for file transfers in Control-M based on search and filter parameters from a command line. The utility creates a .csv file according to the parameters defined. You must run this utility from the Control-M/EM server computer.

Running the emmftcli Utility

This procedure describes how to run the emmftcli utility which enables you to search for file transfers in Control-M based on search and filter parameters from a command line.

Begin

  1. Do one of the following:

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

    • Windows: Open a command prompt window where Control-M/EM is installed. You do not need to be in the Control-M/EM database directory.

  2. Type the following command:

    emmftcli [-u <emuser> -p <password> | -pf <password file>] -s <GUI server name> -o <output file> [-m <timeout>] [-h] -search [ -t <free text> | [-f <filename>] [-fl <folder>] [-ap <application>] [-b <sub application>] [-j <jobname>] [-st <status>] [-src <source>] [-dst <destination>] [-srcp <path>] [-dstp <path>] ] [-d <n days>] [-dt <yyyy/mm/dd-yyyy/mm/dd>] [-l <last n hours>] [-tf <transfered at yyyy/mm/ddThh:mm:ss-yyyy/mm/ddThh:mm:ss>]

Search all file transfers in the current day for application APPL1 and jobname job001 to the file out.csv

emmftcli -u <emuser> -p <pass> -s GUI-server-name -o out.csv -search -ap APPL1 -j job001 -d 1

Search all file transfers in the last 24 hours that contain the text file in the filename to the file out.csv

emmftcli -u <emuser> -p <pass> -s GUI-server-name -o c:\mft\out.csv -search -filename "*file*" -l 24

Search all file transfers that contain the text free text to the file out.csv

emmftcli -u <emuser> -p <pass> -s GUI-server-name -o out.csv -search -t free text

emmftcli Parameters

The following table describes emmftcli parameters. For search with special characters (non alpha numeric) use quotes.

Parameter

Description

-u

Control-M/EM user name

-p

Control-M/EM user password

-pf

Defines a flat file containing an unencrypted username and password on separate lines in the format:

user=username
password=password

-s

The name of the Control-M Configuration Server. It is mandatory to specify this parameter.

-o

out_file <output file>Mandatory. output file in csv format. The utility overrides the data in the output file, if it already exists.

-m

-timeout <timeout>timeout in seconds, to wait for search response.

-h

Shows usage.

-search

Search for File Transfer records according to the specified filter options

-t

Defines free text to search, search for all File Transfer records that contain the specified text in the pre-defined fields (* are treated as any other character). If specified, all other search filter parameters are ignored.

-f

Filters by Filename

-fl

Filters by Folder

-ap

Filters by Application

-b

Filters by Sub Application

-j

Filters by Job Name

-st

Filters by one of the following statuses:

  • 1: IN_PROGRESS

  • 2: COMPLETED

  • 3: FAILED

  • 4: COMPLETED_WITH_ERRORS

-src

Filters by source host

-dst

Filters by destination host

-srcp

Filters by source path

-dstp

Filters by destination path

-d

Determines the number of days back to search for file transfers sent or received. (1 is current day)

-l

Determines the number of hours back to search for file transfers sent or received. from the current time (1 is current hour)

-tf

Determines the period to search for file transfers by date and time according to the following format:

yyyy/mm/ddThh:mm:ss-yyyy/mm/ddThh:mm:ss

The date and times must be in UTC (GMT+00:00).