ctmping
The ctmping utility tests, configures, and reports on the connection and availability between Control-M/Server and Control‑M/Agents or remote host computers.
ctmping can be included in the Watchdog process. For more information, see Watchdog process parameters.
This utility can check if an Agent or remote host is down and, if required, register it in the database as unavailable. When the Agent or remote host again becomes available, the state is changed and information about it is gathered by a Control‑M/Server process.
You cannot ping the Agent if the Agent is upgrading. When the Agent becomes available again, then you can ping the Agent. The following error message appears:
Cannot ping the Agent. Agent is upgrading.
Running the ctmping Utility
This procedure describes how to run the ctmping utility, which enables you to test, configure, and report on the connection and availability between Control-M/Server and Control‑M/Agents or remote host computers.
Begin
-
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.
-
-
Type the following command:
ctmping -HOSTID <hostName> [ -HOSTTYPE <REGULAR|REMOTE> ]
[ -HOSTID <hostName> [ -HOSTTYPE <REGULAR|REMOTE> ] ]
[ -FILE <inputFile> ]
[ -DISCOVER <y|n>]
[ -DEBUG <debugLevel> ]
[ -QUIET ]
[ -FULLDETAILS ]
ctmping Parameters
The following table lists the ctmping utility parameters:
Parameter |
Description |
---|---|
-HOSTID |
Defines the Host name of the Agent or remote host computer to be pinged (tested). At least one Host ID must be specified for each run of the ctmping utility. Additional Host IDs can optionally be specified to enable a single run of this utility to test communication with more than one Agent computer. |
-HOSTTYPE |
Describes the type of computer that is being pinged.
If you do not specify a HOSTTYPE:
If you specify a HOSTTYPE:
|
-FILE |
Defines the full path and name of a file containing a list of host computers to be pinged. Each line in the specified file contains:
The delimiter between the name and the HOSTTYPE is a blank or any number of blank spaces. Where the computer type is not specified, a discovery process attempts to determine the type to be used. See -HOSTTYPE above. Assume the following computers must be pinged: Name Type dime not specified comet Control-M/Agent mars remote host computer The text below specifies the above details in a file: dime(HOSTTYPE is not specified) comet REGULAR mars REMOTE |
-DISCOVER |
Indicates whether to update the database.
If an Agent is
|
-DEBUG |
Activates a debug trace at the specified level. Valid values: 0 - 5. Default: 0. Performance is slower when operating in debug mode. BMC recommends that you activate debug mode only when requested by Technical Support and use the specified level. |
-QUIET |
Suppresses display of utility output. |
-FULLDETAILS |
Generates a status report of the communication parameters of each specified Agent or remote host. Where an Agent is unavailable, the report displays the reason why the Agent is unavailable. Where a remote host is available it displays the connection information. |
ctmping Examples
-
To connect and perform a communication test with the Agent Jacklin, specify the following command:
ctmping -hostid Jacklin
The response is:
CopyAgent: Jacklin is alive
-
To attempt to connect and test communication with Agent Diana (that is currently down), specify the following command:
ctmping -hostid Diana
The response is:
CopyAgent: Diana, Msg: Agent not available.
Add it to the database? y/n: -
To connect and test communication with the Agent Jacklin and collect configuration information needed for the discovery process, specify the following command:
ctmping -hostid Jacklin -discover y
The response is:
CopyAgent: Jacklin is alive
-
To connect and test communication with the Agent Jacklin and generate a debug trace without displaying the results on screen, specify the following command:
ctmping -hostid Jacklin -debug 1 -quiet
Only the return code of the utility indicates if it was successful. The debug trace information is saved to the following file:
~<controlm_owner>/ctm_server/proclog/ping<PID>_<PID>.log
PID is the Process Identity number.
-
The Agents, comet and mars, have been configured to connect to remote host dime. To generate a report showing the result of the test and the connection details, specify the following command:
ctmping -hostid dime -hosttype remote -fulldetails
The following response is displayed:
CopyRemote host [dime] is available through Agent [comet]
Connection protocol : SSH
Port number : 22
Encryption method : REMEDY
Compression : No
Remote host [dime] is available through Agent [mars]
Connection protocol : SSH
Port number : 22
Encryption method : REMEDY
Compression : NoAssume the hostid_list.txt text file contains the full path to the following host IDs:
local Agent Jacklin
remote host dime
regular Agent Diana
-
To generate a report showing the result of pinging the host IDs specified in hostid_list.txt, specify the following command:
ctmping -file ~<controlm_owner>/ctm_server/hostid_list.txt
The response is:
CopyAgent : Jacklin is alive
Remote host : dime is alive
Agent: Diana Msg: Agent not available