ctmhostmap

The ctmhostmap utility enables you to convert Agentless Hosts to Agents and convert Agents to Agentless Hosts. This utility can be run from the command line or the Control-M Configuration Manager (CCM).

Each computer that is defined as an Agentless Host is listed in the Control-M/Server database. The ctmhostmap utility enables you to manage the entries in the database.

Running the ctmhostmap Utility

This procedure describes how to run the ctmhostmap utility, which enables you to map Agentless Hosts to Agents and convert Agents to Agentless Hosts.

Begin

  1. Do one of the following:

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

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

  2. Type one of the following commands:

    • ctmhostmap -action add [-force] -host <remoteHost>
      -Agent <AgentsList>
      -protocol SSH|WMI [-sshport <SSHportNumber>
      -sshalg AES|DES|3DES
      -compression <SSH compression Y/N>] [-outputdir <WMIoutputDirectory>]

    • ctmhostmap -action update -host <remoteHost> [-Agent <AgentsList>]
      [-protocol SSH|WMI]
      [[-sshport <SSHportNumber>
      -sshalg AES|DES|3DES
      -compression <SSH compression Y/N>] [-outputdir <WMIoutputDirectory>]]

    • ctmhostmap -action delete -host <remoteHost>

    • ctmhostmap -action list [-host <remoteHost>]

    • ctmhostmap help

For more information, see ctmhostmap Parameters.

ctmhostmap Actions

The following table describes the ctmhostmap utility actions.

Action

Description

add

Specifies the details of the Agentless Host that is being defined in the Control-M/Server database.

Control-M/Server discovers the specified host using the default Agentless Host map settings if the following is specified without further parameters:

ctmhostmap -action add -host <remoteHost>

Separate the Agent names with a ; (semicolon) when you add more than one Agent.

UNIX: If you are want to add more than one Agent, you must enclose the entire list in " (quotation marks).

"jupiter;andromeda;taurus"

update

Modifies the details of the specified Agentless Host in the Control-M/Server database.

Separate the Agent names with a ; (semicolon) when you add more than one Agent.

UNIX: If you are want to add more than one Agent, you must enclose the entire list in " (quotation marks).

"jupiter;andromeda;taurus"

Control-M/Server replaces the existing settings of an Agentless Host with the Default settings if the following command is specified:
ctmhostmap -action update -host "<Default>"

delete

Deletes the details of the specified Agentless Host from the Control-M/Server database.

list

Lists the details of the specified Agentless Host in the Control-M/Server database. The new list includes all Agentless Hosts and their statuses, except when list is specified with -host (see description below).

help

Displays the usage of the ctmhostmap utility.

ctmhostmap Parameters

The following table lists the ctmhostmap utility parameters:.

Parameter

Description

-force

Overrides an Agent computer that has the same name as the specified computer.

This option is used in order to convert an Agent to an Agentless Host.

For more information, see Creating an Agentless Host.

-host

Specifies the name of the Agentless Host or <Default>. The hostname cannot exceed 50 characters.

This parameter is:

  • Mandatory when specified with add, update, and delete.

  • Optional when specified with list.

<Default > is not applicable if the delete action is specified.

If -host is specified with -list, the Agentless Host is not <Default>, and the status is not Discovering, then the details of the specified Agentless Host are displayed.

The output includes the following:

  • All the Agentless Host definition parameter values.

  • The Agentless Host status.

  • The status of each Agent, showing which Agentless Host is defined to be available through it.

To view the Default Remote Settings, type the following command:
ctmhostmap -action list -host "<Default>"

-Agent

Separate the Agent names with a ; (semicolon) when you add more than one Agent.

UNIX: If you are want to add more than one Agent, you must enclose the entire list in " (quotation marks).

This parameter is:

  • Mandatory when specified with add.

  • Optional when specified with update.

  • Windows: pluto;mars;saturn

  • UNIX: "pluto;mars;saturn"

-protocol

Indicates which protocol is used by the Agent to execute jobs on the Agentless Host.

Valid Values:

  • SSH: Secure Shell (SSH) for UNIX or Windows computers.

  • WMI: Windows Management Instrumentation (WMI) for Windows computers.

If SSH is specified, then the following parameters must be specified:

  • -sshport: Specifies the SSH port number that the SSH daemon is listening to on the Agentless Host.

    Valid Value: 22, or an integer from 1,024 through 65,535.

  • -sshalg: Indicates which SSH encryption algorithm is being used.

    Valid Values:

    • AES

    • DES

    • 3DES

  • -compression:

    Valid values:

    • Y: Compress data.

    • N: Do not compress data.

  • -outputdir: Indicates the directory used for the OUTPUT files created by jobs that have been submitted. The name of the outputdir cannot exceed 1,024 characters.

    Configure the specified directory on the Agentless Host as a shared directory, with the shared name of OUTPUT.

If WMI is specified, then the outputdir parameter must be specified.

The outputdir must be prefaced with \\ (to backslashes), or enclosed with " quotation marks, for example d:\\output_dir or "d:\output_dir".

ctmhostmap Examples

The following are examples of the ctmhostmap utility commands:

  • To add Agentless Host mars to the Control-M/Server database, mapped through Agents pluto, neptune, and venus, using an SSH protocol, run the following command:
    ctmhostmap -action add -host mars -Agent "pluto;neptune;venus" -protocol ssh -sshport 54 -sshalg des -compression N

  • To add Agentless Host saturn, mapped through Agent jupiter, using a WMI protocol, run the following command:
    ctmhostmap -action add -host saturn -Agent jupiter -protocol wmi -outputdir d:\\ctm\\data

  • As described above, but the OUTPUT directory contains spaces. Run the following command:
    ctmhostmap -action add -host saturn -Agent jupiter -protocol wmi -outputdir "c:\ctm eur\data"

  • To add Agentless Host saturn, mapped through Agents jupiter, andromeda, and taurus, using an SSH protocol, run the following command:
    ctmhostmap -action add -host mars -Agent "jupiter;andromeda;taurus" -protocol ssh -sshport 22 -sshalg AES -compression N

  • When you modify an existing entry, only the parameters that you update are mandatory. To change the Agentless Host mars SSH port number from 54 to 48, and to change the SSH algorithm from DES to 3DES, run the following command:
    ctmhostmap -action update -host mars -sshport 48 -sshalg 3des

  • To delete Agentless Host mars from the Control-M/Server database, run the following command:
    ctmhostmap -action delete -host mars

  • To display a list of Agentless Hosts, run the following command:
    ctmhostmap -action list

    The following report appears:

    Copy
    Remote Host          Status
    orion                Available
    taurus               Unavailable
    pegasus              Unavailable
    Action ‘list’ ended successfully.
  • To display the details of Agentless Host orion, run the following command:

    ctmhostmap -action list -host orion

    The following report appears:

    Copy
    Remote host ‘orion’ settings:
    Protocol        : SSH
    Port Number     : 22
    Encryption      : REMEDY
    Compression     : NO
    Agents          : (comet) (meteor) (cyborg)
    Remote Host Status      : Available
    Agents Statuses         : (comet: Available) (meteor: Available) (cyborg: Available)
    Action ‘list’ ended successfully.