Thursday, December 22, 2011

Mainframe : How to identify batch jobs with high CPU usage

Some time our batch jobs may not get CPU time due to CPU intensive jobs or looping jobs. You can follow the below trick to identify such jobs.

1. Go to SDSF;ST
2. Type "DA" in the "COMMAND INPUT"

3. Type "FIL TYPE EQ JOB" in the "COMMAND INPUT" to display only the batch jobs. If type is "STC", it is a started task. If type is "TSU", it is a TSO user job.
4. Type "SORT CPU% D" in the "COMMAND INPUT" to sort the jobs based on CPU% column in the descending order
5. If the "DA" screen do not have the fields shown in the below screen, then use "ARR ?" command to arrange the fields as showsn in the below screen.
  
   Display  Filter  View  Print  Options  Search  Help                         
 -------------------------------------------------------------------------------
 SDSF DA IBM1     IBM1     PAG  0  CPU/L    86/ 42      LINE 1-18 (26)         
 COMMAND INPUT ===>                                            SCROLL ===> CSR 
 PREFIX=*  DEST=(ALL)  OWNER=*  SORT=CPU%/D  FILTERS=1  SYSNAME=               
 NP   JOBNAME  JobID      CPU% CPU-Time  EXCP-Cnt Type C StepName ProcStep 
      XXXXXXXK J0019523  23.13   852.72   2608599 JOB  D JS008             
      XXXXXXXB J0019821  19.62   149.77    153834 JOB  D STEP20            
      XXXXXXX1 J0020170   4.93     0.32      3891 JOB  C JOB99A   STEP01   
      XXXXXXXT J0019142   1.29   175.00   6019779 JOB  D SA#1030           
      XXXXXXXI J0015105   0.39   744.42   2302674 JOB  D UTIL     DSNUPROC 

CPU% indicates the percent of CPU time used on behalf of that address space during the most recent interval measured      

If the CPU-TIME column is incremented and EXCP-cnt do not change each time ENTER key is pressed, that means the job is in loop.                                

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.