Documentation on ctmpsm and other tools

A lot of scripts ans example to extract information from Control-M tools.
Post Reply
User avatar
ogerault
Nouveau
Nouveau
Posts: 2
Joined: 25 Jun 2009 12:00

Documentation on ctmpsm and other tools

Post by ogerault » 26 Jun 2009 12:07

Hi,

I am trying to write my own reporting script to get relevant but simple information on chains and jobs that run yesterday.

I think that the ctmpsm tool provides all information I could need but I am not sure of the meaning of all data and options.

I cannot find a complete documentation on this tool, neither on other tools that look fine as well (ctmlog for example)

Olivier

User avatar
markf
Nouveau
Nouveau
Posts: 134
Joined: 13 Jul 2006 12:00
Location: Switzerland
Contact:

Post by markf » 26 Jun 2009 1:25

ctmpsm is a very useful way to go if you want details about the current run environment. It can also be used to manipulate jobs (should you want to take things one step further).

Obviously it only sees you through until New Day Processing, but you could follow it through something like this -

1. ctmpsm -listall (will show everything)
2. ctmpsm -listall | grep pdisor130_D1PVS (will grep out jobs only with that given name)
3. ctmpsm -listall | grep pdisor130_D1PVS | grep 20090626 (as above but also grepping just those ordered today)
4. You need to use the orderid for some commands so use -

ctmpsm -LISTFULLDETAILS `ctmpsm -listall | grep pdisor130_D1PVS | grep 20090626 |awk '{print $1 }'`

to do that.

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 26 Jun 2009 1:32

Hi,

You find documentation about those tools in : Control-M/Server Admin Guide , Chapter 3 Utilities
Best regards
Walty

User avatar
ogerault
Nouveau
Nouveau
Posts: 2
Joined: 25 Jun 2009 12:00

Post by ogerault » 26 Jun 2009 2:23

Thanks for your replies.

My will is to send a daily mail with the following informations for a group a chains.

Actual version of the chain.
Start time of the chain.
End time of the chain
List of jobs in the chain that ended with NOTOK
Sysout for every NOTOK job

I have an ini file that contains a list of generic name of chain
DUMMY1
DUMMY2
DUMMY3

So, the first step is to find the complete name of the chain

Code: Select all

ctmpsm -LISTALL APPLICATION | grep DUMMY1 | awk '{ print $7 }' | sort -u
Then, I have to find every job that belongs to that chain

Code: Select all

ctmpsm -LISTAJFTAB DUMMY1001 | awk '{ print $2 }' | sort -u
I store them in an array (and keep the orderid of each)

Then, I get the list of all jobs and the start and end time

Code: Select all

ctmpsm -LISTALL TIME
I get the start time of the earliest job to get the chain start time and the end of the latest job to get the chain end time

Then, I get the list of jobs that ended NOTOK

Code: Select all

ctmpsm -LISTAJFTAB DUMMY1001 | grep NOTOK
Finally, for every NOTOK job, I get the sysout

Code: Select all

ctmpsm -LISTSYSOUT <orderid>
Do you think it is way to complicated for what I need?
Is there a better way?

I cannot reach directly the Oracle database, so I cannot launch a SQL.

Olivier

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 02 Jul 2009 8:37

Hi,

the usage of ctmlog is a good approach for your auditing.
With output send on a flat file, you can after manipulate this data with a sample script.
Best regards
Walty

Post Reply