Page 1 of 1

Need to get a list of top 10 long running jobs

Posted: 07 Mar 2013 3:25
by HeleneM
Hi

we have recently upgraded Control-M to v7 with a postgres db.

I need a script to list out the top 10 long running jobs each day and also details of how to run it!

many thanks in advance

Helene

Query on database

Posted: 22 Mar 2013 11:46
by fafa1975
Hi,
You can query the cmr_ajf table on the Control/M Server database.

SELECT applgroup,nodeid,memname,odate,startrun,endrun,jobname,applic, cast(endrun as bigint) - cast(startrun as bigint) as seconds_elapsed
FROM cmr_ajf order by seconds_elapsed desc LIMIT 10 ;

You can schedule the query just before the NDP and you have the top 10 long running jobs.

Hope it helps.

Fabrizio

Re: Need to get a list of top 10 long running jobs

Posted: 30 Jun 2015 5:09
by Dablu
Thanks Fabrizio,
But can you let me know the same on pgsql DB and Control-M server is on windows.

Thanks for the update..

Re: Need to get a list of top 10 long running jobs

Posted: 03 Jul 2015 5:19
by Dablu
fafa1975 wrote:Hi,

You can query the cmr_ajf table on the Control/M Server database.



SELECT applgroup,nodeid,memname,odate,startrun,endrun,jobname,applic, cast(endrun as bigint) - cast(startrun as bigint) as seconds_elapsed

FROM cmr_ajf order by seconds_elapsed desc LIMIT 10 ;



You can schedule the query just before the NDP and you have the top 10 long running jobs.



Hope it helps.



Fabrizio

Hi,

Can you help out how to set it up on Windows through a bat file with an automated mail
my Controm DB on default PGSQL
I did it on unix with oracel db , but having problem in above environment....

Thanks,
Dablu