Agent Troubleshooting Utilities

The following Agent utilities describe how to troubleshoot the Agent if there are issues.

ag_diag_commLink copied to clipboard

The ag_diag_comm utility is a diagnostic tool that checks parameters and environmental conditions that are relevant to communication between the Agent and Control-M/Server hosts. This utility is typically used at the request of Technical Support to determine the cause of a communication problem.

Running the ag_diag_comm UtilityLink copied to clipboard

This procedure describes how to run the ag_diag_comm utility, which enables you to generate a diagnostic report on the Agent communication.

Begin

  1. Navigate to the directory where the Agent is installed.

  2. Enter the following command:

    ag_diag_comm

    The Agent Communication Diagnostic Report appears.

    CopyCopied to clipboard
    Control-M/Agent Communication Diagnostic Report
    -----------------------------------------------

    Agent User Name : agbebes
    Agent Directory : /home/agbebes/ctm
    Agent Platform Architecture : Linux
    Agent Version : 9.0.20.080
    Agent Host Name : vl-tlv-ctm-dv1k.bmc.com
    Logical Agent Name : vl-tlv-ctm-dv1k.bmc.com-agbebes
    Server-to-Agent Queue : https://sqs.us-west-2.amazonaws.com/075123970104/abebes-15569_s2a_732e999f-7274-44a3-b28d-a4be05903ae0.fifo
    Agent-to-Server Queue : https://sqs.us-west-2.amazonaws.com/075123970104/abebes-15569_a2s_38a1de05-6aae-4f20-b56e-54416aab6839.fifo
    Signaling Queue : https://sqs.us-west-2.amazonaws.com/075123970104/abebes-15569_signalingQueue
    Server-Agent Protocol Version : 13
    Server-Agent Comm. Protocol : HTTPS
    Agent Ping to Control-M/Server : Succeeded

    Agent processes status
    ======================
    Java services : ["ar","onboarding","housekeeping"] on port 38029
    Agent Listener : Running as agbebes (7907)
    Agent Tracker : Running as agbebes (8023)
    Agent Tracker-Worker : Running as agbebes (8025)

    If the user is not the Administrator, the ag_diag_comm command shows partial details.

ag_pingLink copied to clipboard

The ag_ping utility verifies whether the Control-M/Server is connected to the Agent host. The utility attempts to communicate with the Control-M/Server and indicates whether the attempt succeeded or failed. If the attempt succeeds, the following message appears:

Output:

Server is alive.

Result: Success.

_exitLink copied to clipboard

The _exit utility enables you to terminate processes on Windows and is similar to the built-in exit shell function on Linux.

Running the _exit UtilityLink copied to clipboard

This procedure describes how to run the _exit utility.

Begin

  1. Create an OS and define the Type attribute as Command, as described in Creating a Job.

  2. In the Command field, type the following:

    _exit <exitCode>

    where the <exitCode> variable is any whole integer number n.

    Default: 0

    The job output shows %errorlevel% = <exitCode>.

    Define _exit 0 to cause the job to end with %errorlevel% 0.

    Define _exit 1 in a script to cause the job to end with %errorlevel% 1.

_sleepLink copied to clipboard

The _sleep utility enables you to suspends execution for a defined interval of time, and is similar to the built-in sleep shell function on Linux.

Running the _sleep UtilityLink copied to clipboard

This procedure describes how to run the _sleep utility on Windows.

Begin

  1. Create an OS job as command, as described in Creating a Job.

  2. In the Command field, type the following:

    _sleep <seconds>

    The <seconds> variable is the number of seconds the execution is suspended.

start-ag/shut-agLink copied to clipboard

The start-ag and shut-ag utilities enable you to start up and shut down the Agent.

Starting Up the AgentLink copied to clipboard

This procedure describes how to start up the Agent.

Begin

  • Do one of the following:

    • Linux: To start the Agent on Linux, run the following command:

      start-ag

      • To specify a user, add -u <Agent_User>.

      • To start a specific Agent process, add -p <process>.

      • To start all the Agent processes, add -p all.

    • Windows: To start the Agent on Windows, do the following:
      1. Run the following command:

        services.msc

      2. Right click the Control-M/Agent service and click Start.

        The Agent starts up.

Shutting Down the AgentLink copied to clipboard

This procedure describes how to shut down the Agent.

Begin

  • Do one of the following:

    • Linux: To shut down the Agent on Linux, run the following command:

      shut-ag

      • To specify a user, add -u <Agent_User>.

      • To shut down a specific Agent process, add -p <process>.

      • To shut down all the Agent processes, add -p all.

    • Windows: To shut down the Agent on Windows, do the following:
      1. Run the following command:

        services.msc

      2. Right click the Control-M/Agent service and click Stop.

        The Agent shuts down.

agdbglvlLink copied to clipboard

The agdbglvl utility enables you to change the Agent debug level in the log.

The agdbglvl command is as follows:

  • Linux: agdbglvl <Log_Level>

  • Windows: agdbglvl -agent <Agent_Name> <Log_Level>

where the <Log_Level> parameter is any number from 0 to 5, where 0 is no diagnostic activity, and 5 is the highest level of diagnostic activity.