TAA Tools
RUNCPU          RUNCPU                                 TAATIMU

The Run CPU command is  intended as a testing aid to allow  a batch job
to use  the CPU for  a number of seconds.   RUNCPU submits  a batch job
that  loops and  periodically checks  the time  of day to  determine if
the job should  end.   The job may  either run  continuously or have  a
periodic delay.

There are two methods of using RUNCPU:

  **   The  first  method  runs  the  CPU for  the  number  of  seconds
       specified.

       A typical command would be:

            RUNCPU     SECONDS(30)

       A  batch job  by the name  of RUNCPU  would be  submitted to the
       QSYSNOMAX job  queue that  would run  the CPU.    The batch  job
       program  determines  the  end  time  by  adding  the  number  of
       seconds  specified to  the time  the job  started.   The program
       then goes into a loop  and periodically checks the current  time
       against the proposed  end time.   When the proposed end  time is
       exceeded, the job ends normally.

       The  job  will be  in  the  RUN status  (as  seen by  WRKACTJOB)
       assuming the job has an activity slot.

       The  job  runs with  the Job  Description  assigned to  the user
       profile that submits  the job.   Batch jobs determine their  run
       priority based  on the Class  assigned by the  subsystem routing
       entry.   A typical batch  job uses the QBATCH  class which has a
       run priority of 50.

       Note that if  other jobs are  running on the  system, the  batch
       job  will only  run  when it  has  an activity  slot  and a  run
       priority.   RUNCPU determines when  to end the job  based on the
       number of seconds specified added  to the time the job  started.
       Because  of the  activity slot  and  run priority  requirements,
       the  job  may  not  use  the  CPU  for  the  number  of  seconds
       specified.  However, it will remain active.

       No messages or spooled files are created.

  **   The  second method is  similar to the first,  but allows a burst
       of CPU activity at periodic intervals.

       A typical command would be:

            RUNCPU     SECONDS(30) DLYTIM(3)

       A batch  job by the  name of  RUNCPU would be  submitted to  the
       QSYSNOMAX  job queue.   It would  loop running  several commands
       and  then delay  for 3  seconds.  This  would be  repeated until
       the 30 second time limit is met.

       The job  will  mostly appear  in  a DLY  status  as it  will  be
       waiting for the delay time to expire.

       Note  that the  job ends  based on  the  time of  the value  for
       SECONDS  added  to the  time the  job  started.   The  total CPU
       activity for the job will not be equal to the SECONDS value.

RUNCPU escape messages you can monitor for
------------------------------------------

None.  Escape messages from based on functions will be re-sent.

Command parameters                                    *CMD
------------------

   SECONDS       The number of seconds the  batch job should run.   The
                 time is added to  the time the batch job  starts.  The
                 number must be between 1 and 99999.

   DLYTIM        The amount of time to perform a periodic delay.

                 0  is the default  meaning there  is no delay  and the
                 job runs until the number of seconds has been met.

                 A  value may  be entered between  1 and  60 seconds to
                 cause a  burst of  CPU activity on  a periodic  basis.
                 The  value cannot exceed  the SECONDS  value.   At the
                 end  of each burst  of CPU usage, the  job would delay
                 for the time specified.   The job ends when the  value
                 in the SECONDS  parameter has been met.   For example,
                 if  SECONDS(30)  is  specified  with DLYTIM(3),  there
                 would be a burst  of CPU time followed  by a 3  second
                 delay.   This  would  be  repeated until  the  current
                 time is  equal to 30 seconds after  the time the batch
                 job started.

   JOBQ          The  qualified  name of  the job  queue to  submit the
                 batch  job  to.    QSYSNOMAX  is  the  default.    The
                 library  value defaults  to *LIBL.   *CURLIB  may also
                 be used.

Restrictions
------------

None.

Prerequisites
-------------

The following TAA Tools must be on your system:

     ADDTIM          Add time
     CHKOBJ3         Check object 3
     RSNLSTMSG       Resend last message

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   RUNCPU        *CMD                   TAATIMU       QATTCMD
   TAATIMUC      *PGM       CLP         TAATIMUC      QATTCL
   TAATIMUC2     *PGM       CLP         TAATIMUC2     QATTCL
					

Added to TAA Productivity tools December 15, 2000


Home Page Up to Top