How to get state of job with a command line

A lot of scripts ans example to extract information from Control-M tools.
Post Reply
User avatar
ohemeg
Nouveau
Nouveau
Posts: 3
Joined: 06 May 2010 12:00

How to get state of job with a command line

Post by ohemeg » 05 Apr 2012 6:24

Hello

I am a control-M user and not and admin :)

Our ordering plan is about 7h00, and we need to get a report for the states oj jobs running between 3h and 8h.

I try with the command ctmpsm but it only give me the jobs which are in the active viewpoint only, all jobs which finished OK, disappeared with the daily AJF of 7h.

Do you know another way to get this information ?

Thanks

====

En français :) :

la montée au plan est à 7h00 et nous avons des jobs qui tourne au plan entre 3h et 8h0, donc à cheval sur 2 plans. Nous avons besoin de transmettre à nos client un reporting des jobs en question avec leur état. Nous avons essayer avec la commande ctmpsm dans un script perl pour faire le nécessaire mais il ne nous remonte que les jobs toujours actifs lors de la nouvelle montée au plan.

Avez vous une solution pour tout récupérer sans tenir compte de montée au plan, donc juste en se basant sur la ODATE.

MErci

User avatar
Jean-Mi
Nouveau
Nouveau
Posts: 19
Joined: 08 Sep 2006 12:00
Contact:

Post by Jean-Mi » 06 Apr 2012 8:47

Hi,

You can use the 'Reporting Facility' to do this.

Jean-Michel.

User avatar
chriskwan
Nouveau
Nouveau
Posts: 3
Joined: 11 Apr 2011 12:00

Post by chriskwan » 09 Apr 2012 7:52

Sorry to tag along with your post. If I don't have the reporting facility. Any other ways to generate the report?

Thanks.

User avatar
meuser
Nouveau
Nouveau
Posts: 4
Joined: 23 Nov 2010 12:00

Post by meuser » 10 Apr 2012 8:03

Hi,

you could try to use the ctmlog utiltiy, like in the following scripts.

SCRIPT start_ctmlog ( our newday time is 0600 )

#!/bin/ksh
vandatum=$1
totdatum=$2
ulogdir=$HOME/ctm_server/userlog
scriptdir=$HOME/ctm_server/scripts
ctmlog list $vandatum 0600 $totdatum 0610 ${ulogdir}/ctmlog_${vandatum}.txt
chmod 777 ${ulogdir}/ctmlog_${vandatum}.txt
perl ${scriptdir}/ctmlog_parser.pl ${ulogdir}/ctmlog_${vandatum}.txt > ${ulogdir}/ctmlog_${vandatum}.rpt
chmod 777 ${ulogdir}/ctmlog_${vandatum}.rpt
cat ${ulogdir}/ctmlog_${vandatum}.rpt


for the ctmlog_parser.pl see
http://www.robertstinnett.com/control-m ... er-script/

SCRIPT start_ctmlog_newday

#!/bin/ksh
totdatum=$1
ulogdir=$HOME/ctm_server/userlog
scriptdir=$HOME/ctm_server/scripts
ctmlog list $totdatum 0600 $totdatum 0610 ${ulogdir}/ctmlog_newday_${totdatum}.txt
chmod 777 ${ulogdir}/ctmlog_newday_${totdatum}.txt
perl ${scriptdir}/ctmlog_parser.pl ${ulogdir}/ctmlog_newday_${totdatum}.txt >${ulogdir}/ctmlog_newday_${totdatum}.rpt
cat ${ulogdir}/ctmlog_newday_${totdatum}.rpt


hope this helps

Martin

Post Reply