Report of jobs running on day

A lot of scripts ans example to extract information from Control-M tools.
Post Reply
User avatar
th_alejandro
Nouveau
Nouveau
Posts: 188
Joined: 26 Nov 2008 12:00
Location: Bogotá

may be ...

Post by th_alejandro » 27 May 2009 6:43

try this :

ctmpsm -LISTALL | grep JOB | grep AAAAMMDD | grep -v Deleted | wc -l

grep JOB : is used in this filter to avoid GRP count (scheduling groups)
grep AAAAMMDD : is used to only show ODAT jobs
grep -v Deleted : is used to avoid deleted jobs from active jobs
wc -l : is used (aix command) to count lines (in this case jobs).

note: If you have recoursive jobs or cyclic jobs, you can't count how many jobs you will run. I have a Excel page with my inventory and calculate ciclyc jobs and recoursive jobs (jobs not created in desktop, jobs created using ctmcreate commando when i need).

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

Post by Walty » 27 May 2009 9:07

Hi,
you can use the <ctmlog> utility

ctmlog listmsg <msgid> <From Date> <From Time> <To Date> <To Time> <output> <reportWith>

where msgid=5133 for Job ENDED OK
where msgid=5134 for Job ENDED NOTOK

Example for KO jobs

ctmlog listmsg 5134 20090527 0000 20090527 2359 /tmp/jobs-ko.log 132

When you have the flat file you can execute what you want.
You can construct daily audit with other msgid like:

msgid=5401 for job HELD
msgid=5402 for job FREED
msgid=5403 for job DELETED
msgid=5404 for job RERUN
msgid=5405 for job CONFIRMED
msgid=5408 for job UNDELETED
msgid=5409 for job KILLED
msgid=......
Best regards
Walty

User avatar
yo_sachin
Nouveau
Nouveau
Posts: 3
Joined: 01 Jan 2009 12:00

can i have the above mentioned command for windows server

Post by yo_sachin » 11 Jun 2009 9:36

we are in windows environment and i want to know all the jobs that ran on particular node(server) on a particular date .....


KINDLY HELP IT IS URGENT

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

Post by markf » 11 Jun 2009 10:22

use the ctmlog commands as shown above and combine withe the windows equivalent of grep (which, I think, is FINDSTR).

For example, if I wanted to search on yesterday and see any time the node had gone unavailable -

ctmlog LISTMSG 5222 090610 0400 090610 2000 |findstr /i /r "problem_node_here"

(with your agent inside the quotes)

However it might be better just to look for the agent name in general -

ctmlog LIST 090610 0400 090610 2000 |findstr /i /r "problem_node_here"

We don't Windows for the Control-M Server, so I cannot test the above.

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

Post by markf » 11 Jun 2009 10:31

sorry, I just realised my example uses time stamps from 4am-8pm ... please alter as required.

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

Post by Walty » 17 Jun 2009 1:57

Hi,
i suggest to schedule a daily job to archive the Controlm log.
ctmlog <Action> <From date> <From Time> <To Date> <To Time> [<Output> [<Report Width>] ]

Example:
ctmlog list 090616 0000 090617 0000 <your_yymmdd.log> 132
After it's easy to find some informations in the file.

If you have implemented the <ctmjsa> utility try the <ctmruninf> utility
You find statistics data from each successful job execution.

CTMRUNINF usage:
ctmruninf -list <fromtime> <untiltime> [<filter...>] [-total]
ctmruninf -delete <fromtime> <untiltime>
ctmruninf -purge

fromtime, untiltime : YYYYMMDDHHMMSS
filters : -JOBNAME <jobname>
-MEMNAME <memname>
-MEMLIB <memlib>
-NODEID <nodeid>
-ORDERID <orderid>
The <filter..> parameter is optional.

-total : Prints number of records, total CPU & ELAPSED times


NOTE: only first 10 characters of JOBNAME field are displayed.

ctmruninf -list YYYMMDDHHMMSS YYYMMDDHHMMSS -NODEID <nodeid>
ctmruninf -list "*" -JOBNAME <jobname>
ctmruninf -list "*" -NODEID <nodeid>
Best regards
Walty

Post Reply