Saturday, July 27, 2013

Why statistics are not correctly shown in the Control-M/EM GUI?

"ctmjsa" is used to collect statistics of all Control-M jobs.

Generally calculation of statistics can be done with Jobname or Memname

This is determined by the Operational Parameter Statistics Mode.

When it is set to Memname the statistics won't be shown right.

Change Statistics Mode to Jobname, recycle Control-M, run ctmjsa again, and now view Statistics of any job from Control-M EM GUI. You can see the difference.

Thursday, July 25, 2013

How can you say if the agent for a particular job is available?

While there is a continuous connection between CONTROL-M EM and Control-M/EM Server, the communication between CONTROL-M/Server and CONTROL-M/Agent is not constant.

CONTROL-M/Server is doing the following:

1. It sends a TRACK_ALL message for each agent that has running jobs every 'Polling Interval' (the default is 15 minutes).

2. There is no indication that an agent becomes unavailable unless there was a request to that agent.

While the agent waits for its time window it does not check if the agent is available. This will be checked only when the job will be submitted.

3. You can check the Agent status using Control-M Configuration Manager.

What can I do if my agents become unavailable sometimes?

Solution: Run ctm_menu:

(5) Parameter Customization -> (4) Parameter Customization for Specific Agent Platform:

Communication Timeout (default 120)

Maximum Retries (default 12)

Increase the timeout parameters for the agent platforms. The same can be achieved using Control-M Configuration Manager. You can open Agent properties and change the parameters accordingly.

Wednesday, July 24, 2013

How do I check communication between Server and Agent?

From the Agent run:

From the Server run:
   ctm_diag_comm <Agent host name>

Compare the results. Specially check the following:

  1. Server-to-Agent Port Number is the same on both outputs
  2. Agent -to-Server Port Number is the same on both outputs
  3. Server-Agent Comm. Protocol is the same on both outputs
  4. Unix ping to Agent Platform, ctm_ping to agent, and Unix Ping to Server Platform all Succeeded
  5. Service "<agent service>" is Active
  6. Server Host Name, in ag_diag_comm output, is correct.

Thursday, July 11, 2013

How to KILL a Job using PostProc Tab

During our day to day activities sometimes we may come across a scenario to Kill a job during run time. The most commonly scenario is to kill a job when it is exceeding its normal time limit. We can achieve this using PostProc tab without any manual intervention.

To perform this you MUST have access to Control-M Server.
  1. You have to connect to Control-M Server using Telnet.
  2. From the "ctmsys" menu, goto "Shout Destination Tables" and define a shout destination with type "P" (process), Address Type "A" (agent), Logical Destination "Kill_Job" and Physical Destination"$HOME/ctm/exe_<architecture>/".
  3. Go to your CONTROL-M/Server home directory, and define a script under ctm/exe_<architecture>/. The script name will be "", which contains the following lines:

    ctmkilljob -ORDERID $2 &

    Note: the ampersand (&) at the end of the command. This must be present for this solution to work.
  4. Job definition
    • Goto the "PostProc" tab and define a shout WHEN LATETIME or EXECTIME
    • in the Destination put "Kill_Job
    • in the Message Box put "%%ORDERID" (the parameters for the "" script).

Wednesday, July 10, 2013

How to get a job to email the SYSOUT

Update the STEPS panel of the failing job with the following statements:

      On Stmt=*            Code=COMPSTAT!0 (or NOTOK or other specific return codes)
      DO Set-Var          %%\G_ORDERID                %%ORDERID
      DO Set-Var          %%\G_JOBNAME               %%JOBNAME
      DO Set-Var          %%\G_MAILADDRESS
      Do Force-Job      Table=YourTable                 Jname=EMAILSYSOUT

Note: The “Do Set-Var” is setting global variables to be passed to another job. Global variables are defined using a backslash.
The global variables are used in the other job without the backslash.

Force job definition: Job name EMAILSYSOUT

On the command line:
ctmpsm -LISTSYSOUT 000%%G_ORDERID |mailx -s "Job %%G_JOBNAME failed. See sysout attached!" %%G_MAILADDRESS

Note: The Node-id on the Execute tab must be the home server for Control-M.

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Design by Awesome Deals | Bloggerized by Mahendra - 24x7FunOnline