TAA Tools
SYSHST          SYSTEM HISTORY                         TAASYTD

The System  History  tool provides  a simple  method  of capturing  and
displaying important  system information such as the  amount of storage
used,  amount of  CPU used,  interactive transactions  entered, and the
average response time.   Capturing the information daily allows  you to
display or print a historical perspective of system growth.

A typical display would appear as:

**********************************************************************

                     Display System History - TAA
                                                       1/06/09
           Position to date . . .  010509

 Type options, press Enter.           -- Jobs with LT --
   5=Display                           4.0 Secs Avg Resp
                  ASP 1 Stg   ASP 1    Interactive   Avg  Batch    CPU
 Opt Date     Day    in GB     % used  Transactions  resp  jobs  hours
  _  1/05/09  Mon     8.590    51.01         3,563   .49    105    .15
  _  1/04/09  Sun     8.590    51.04         4,881   .23    139    .11
  _  1/03/09  Sat     8.590    51.20         4,110   .90    102    .46
  _  1/02/09  Fri     8.590    50.97         4,345   .21    139    .12

 F3=Exit    F6=ASP history    F12=Cancel

**********************************************************************
To  begin  the function,  an  *ALLOBJ  user  must enter  the  following
command:

             STRSYSHST

This  creates  a job  schedule entry  by the  name  of CAPSYSHST.   The
default is set to  run everyday at 10 minutes  past midnight.  If  your
system is  not active  at the  time specified,  the job  runs when  the
system is IPLed.

The  CAPSYSHST  job  uses the  CAPSYSHST  TAA  command  to capture  the
system information for  the prior day.   If the required  files do  not
exist  in   QGPL,  they   are  created   automatically.    The   system
information which is captured includes:

  **   Performance  information  from  the  CPF1164  message  in  QHST.
       There  is one record for each  completed job on the system which
       describes  the  amount  of  CPU  used  and  the  number  of  I/O
       operations.    Interactive  jobs  also  contain  the  number  of
       transactions  entered.    Note  the  comment  about the  CPF1164
       message in the 'Restrictions' section.

  **   Storage  information  about  ASP  1  (the  System  ASP).    This
       includes  the  total storage  and  the  percentage used.    Also
       provided  is the  amount of storage  required for  QHSTxxx files
       and journal receivers.

  **   Various counts  such as  the  number of  user profiles  and  the
       number of libraries.

  **   Critical save  dates  and times.   This  provides  a history  of
       important save  dates such as the last  completion of SAVSYS and
       SAVLIB(*NONSYS).

  **   PTF   information.    This   includes  the  date   of  the  last
       cumulative PTF package and when it was applied.

  **   Spool  summary  information.    This  includes  the   number  of
       members and  size of the QSPL  libraries.  The  actual number of
       spooled file members with data is also available.

  **   Number of IPLs.  Both normal and abnormal IPLs are counted.

  **   Last  powerdown information.    The start  and end  date/time of
       the last power down is shown along with an elapsed time.

  **   Last IPL information.  The  start and end date/time of the  last
       IPL is with an elapsed time.

  **   A count of the jobs in the system.

  **   RCLSTG information.   The  start and end  date/time of  the last
       RCLSTG.

  **   ASP  information.   If you  have a single  ASP (only  the system
       ASP), the  captured information  is  mostly redundant  with  the
       previous storage  information  that is  captured.   If you  have
       multiple  ASPs, the  total amount  of storage  for each  ASP and
       the percentage used is captured.

To display the information, use the DSPSYSHST command.

             DSPSYSHST

A  subfile of records is displayed with the  most recent date first.  A
detail display may  be accessed as well  as the ASP information  (using
F6).   You may  also display the  records for a  particular day  of the
week  (such as Monday) regardless of date  to provide a broader view of
growth on your system.  See the DAYOFWEEK parameter.

DSPSYSHST may  also  be  used to  print  the results.    Various  print
options exist  so that you  can follow the  results of a  specific area
for the dates you have captured information for.

A  separate command MTNSYSHST  is used for  cleanup purposes.   See the
later discussion.

How to 'try out' the System History function
--------------------------------------------

The intended use  of the  function is  to have the  job schedule  entry
cause the CAPSYSHST  command to be run every  day.  If you want  to try
out  the function,  you can  enter the  CAPSYSHST command  directly (or
submit  it to batch).   You must have *ALLOBJ  special authority to use
CAPSYSHST.

Information will be captured  for the CPF1164 messages for  each unique
day  that is found  in the  QHST files.   However,  all the  counts and
storage  information will  be  identical because  the data  is captured
when CAPSYSHST is run and does not exist in the QHST files.

You  can display  the  information  or  print  it  with  the  DSPSYSHST
command.

CAPSYSHST Command
-----------------

The  CAPSYSHST command  is set  to run  at  the time  specified on  the
STRSYSHST  command (default is  10 minutes after  midnight).  CAPSYSHST
will create one  record for each  day in  in the SYSHSTP  file in  QGPL
and one record per ASP in the SYSHSTS file in QGPL.

Running  after  midnight  allows  all   QHST  job  completion  messages
(CPF1164)  for the  previous  day to  be  summarized as  well  as other
system  information.    Note that  the  summary record  that  is output
includes:

     - Job summary information from the previous day
     - Counts and storage information at the time the job is run

The current day  is not considered  because all jobs  for the day  have
not completed  at that  point.  Once  the QHST information  is captured
for  a day, it  is never  summarized again.   Any new  records that are
added are never updated.

If the CAPSYSHST command  has not been run  for several days, a  record
for  each  day  where  a  CPF1164  message  exists,  will  be  created.
However,  the  counts and  storage  information will  be  identical for
each new record created.

Note that the CPF1164  message is the summary  when the job  completes.
A job  which starts  before midnight  and does not  complete until  the
following  day will  be considered  to have  run  entirely in  the next
day.

If  the system  is not  active at  10 minutes  after midnight,  the job
will be submitted when the system is IPLed.

Performance Information
-----------------------

Interactive jobs are divided  between those that average less  than 4.0
seconds  of average  response time  and those  that are  greater.   The
reason  for the division is that  some jobs such as  SAVSYS must be run
interactively, but will cause the normal averages to be skewed.

A better indication of  how your system  is performing is to  summarize
the jobs that have a normal response time range.

Batch jobs  are also divided  between those  that have taken  less than
30 seconds  of CPU and those that take longer.   There can be some very
long running  intensive  CPU  batch  jobs  which  will  also  skew  the
average.

If you  want more detail  about job performance,  you can consider  the
following TAA tools:

       - PRTQHSTANL
       - PRTJOBSUM
       - JOBACG

MTNSYSHST Command
-----------------

After  some period  of time, you  may want  to cleanup  old information
from  the files  used by  the System  History function.   The MTNSYSHST
command is provided  to delete old  records based on  a number of  days
retention  value.   You  must  have *ALLOBJ  special  authority to  use
MTNSYSHST.

An  option exists  to allow you  to retain  all records  for a specific
day of the week (such as  Monday) to provide a broader historical  view
without retaining as much data.

A  typical command  to  delete  all records  over  two  years old  (730
days),  but  still retain  the Monday  records  that are  older  than 2
years would be:

             MTNSYSHST    NBROFDAYS(730) DAYOFWEEK(*MON)

All records  that are  less that  two years  old would  be retained  as
well as  all  Monday records  regardless of  how  old they  were.   All
other records would be deleted and the files reorganized.

Security considerations
-----------------------

You must have *ALLOBJ special authority to use the commands:

          STRSYSHST
          CAPSYSHST
          MTNSYSHST

The files  in QGPL which are used to  store the information are created
as PUBLIC(*USE).

The  DSPSYSHST command is  a 'display only' function  and is created as
PUBLIC(*USE) allowing any user to display or print the information.

Files used
----------

The System  History files  are  automatically created  by CAPSYSHST  if
they do not exist in library QGPL.

   SYSHSTP       Physical.   One  record for  each day  that  a CPF1164
                 message   exists  for.     Each  record  contains  the
                 majority  of   information   captured.     Source   is
                 TAASYTDP.

   SYSHSTL       Logical over SYSHSTP.  Source is TAASYTDK.

   SYSHSTS       Physical.   One  record for  each ASP  that exists  on
                 the  system  for  each  day  that  a  CPF1164  message
                 exists.     The  record   contains  ASP   information.
                 Source is TAASYTDS.

   SYSHSTT       Logical over SYSHSTS.  Source is TAASYTDT.

   TAASYTDQ      File in TAATOOL  that is used to define  Ext Described
                 DS.  Source is TAASYTDQ.

System History escape messages you can monitor for
--------------------------------------------------

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

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

   NAME          The name  of the job for the job  schedule entry.  The
                 default  is CAPSYSHST.  The  command ensures that this
                 name  is  unique  to  allow  simple  tracking  of  the
                 function.

                 If you  are already  using the name  CAPSYSHST, ensure
                 the  job  schedule  entry  is  not  also  for the  TAA
                 function (the TAA command  is TAATOOL/CAPSYSHST).   If
                 not, use a different name such as CAPSYSHST2.

   SCDTIME       The time to  schedule the CAPSYSHST job.   The default
                 is  10  minutes  after  midnight  (001000).   If  your
                 system is not  active when the  job is scheduled,  the
                 job will be run when the system is IPLed.

                 The job  should be scheduled  as early  in the day  as
                 is practical for your situation.

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

None.

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

   DAYOFWEEK     The day  of week to be selected.   The default is *ALL
                 for all days of the week.

                 Entering  a value such  as *SUN, *MON  ...  allows you
                 to reduce the  amount of output  by looking at only  a
                 single day of  the week for all records  in the System
                 History files.

   OUTPUT        How  to output the results.   The default is * meaning
                 to display the  results if  the command is  run in  an
                 interactive job.

                 If the  command is  run in  a batch  job or *PRINT  is
                 specified,  printed  results  will  occur.    See  the
                 PRTTYPE parameter to  determine which  type of  output
                 is required.

   PRTTYPE       The type of  information to be printed if  printing is
                 requested.    The  default  is *BASIC  which  provides
                 much  of  the  same  information  that  exists  on the
                 first display  shown if  interactive use is  requested
                 (the  subfile data).   If  you specify  a  value other
                 than  *BASIC, you must  be printing  rather than using
                 the interactive  display (see  the OUTPUT  parameter).

                 *ASP may  be specified to  print the  ASP information.
                 You  must also  specify the  ASP  to be  printed using
                 the PRTASP parameter.  If  you have only a single  ASP
                 (the   System  ASP),   this   information  is   mostly
                 redundant to that shown with the *BASIC option.

                 *COUNTS  may   be  specified  to   print  the  various
                 functions  that  are  counted such  as  the  number of
                 user profiles and the number of libraries.

                 *BCHPERF may  be specified  to  print the  performance
                 aspects  of  batch  jobs.     See  also  the  PERFTYPE
                 parameter.

                 *INTPERF  may be  specified  to print  the performance
                 aspects of interactive  jobs.   See also the  PERFTYPE
                 parameter.

                 *OTHPERF  may be  specified to  print the  performance
                 aspects  of 'Other'  jobs.   An 'Other'  job is  a job
                 which is  not  an interactive  job  and not  a  normal
                 batch  job.   It includes  system  jobs, writer  jobs,
                 etc.    When using  *OTHPERF,  the PERFTYPE  parameter
                 must be *NORMAL.

                 *PTF  may be specified to  print information about the
                 last Cumulative  PTF  Package installed  and the  last
                 dates  for temporarily  and permanently  applied PTFs.

                 *SAV  may be  specified to  print the last  save dates
                 and times  for the  critical  save operations.    This
                 allows  a  good  review  to   ensure  that  your  save
                 strategy is being followed correctly.

                 *STG may  be specified to print  the important storage
                 information  relative  to  ASP1,  QHSTxxx  files,  and
                 Journal Receivers.

                 *SPL may be  specified to print the number  of members
                 and their sizes from the QSPL library.

                 *IPL  may be  specified  to print  the  last powerdown
                 and  last  IPL information  for each  day.   The start
                 and  end  time  of  each  is  listed  along  with  the
                 elapsed time of  each.  The IPL time  does not include
                 the  time for the start up  of subsystems such as TCP.

                 *RCLSTG may be  specified to print  the start and  end
                 date/time of the last RCLSTG that occurred.

   PERFTYPE      The performance type  to print if PRTTYPE  is *INTPERF
                 or *BCHPERF.   The default is  *NORMAL which means one
                 line  is  printed  for  each  day  of  history.    For
                 PRTTYPE(*INTPERF), it is  the jobs that  averaged less
                 than   2.0   seconds    of   response   time.      For
                 PRTYPE(*BCHPERF),  it is the jobs  that used less than
                 30 seconds of CPU time.

                 *NORMAL2 may  be  used to  print  the same  values  as
                 *NORMAL  plus  a  breakdown  of  the  interactive  job
                 performance.   Each day prints  4 additional lines for
                 average  response  times   of  0.00-0.49,   0.50-0.99,
                 1.00-1.49, and  1.50-1.99.   Only the  number of  jobs
                 and transactions are shown for each breakdown.

                 *EXCEPTION  may be specified  which means  one line is
                 printed   for   each    day   of    history.       For
                 PRTTYPE(*INTPERF),  it  is  the   jobs  that  averaged
                 greater  than  or equal  to  2.0  seconds of  response
                 time.    For PRTTYPE(*BCHPERF),  it  is the  jobs that
                 used greater  than  or  equal  to 30  seconds  of  CPU
                 time.

                 *BOTH  may be  specified which  means three  lines are
                 printed  for each  day.   This includes the  same line
                 for *NORMAL,  the  line for  *EXCEPTION, and  a  total
                 line for the day.

                 *ALL  may be  specified  which means  seven lines  are
                 printed  for each day.   This includes  the same lines
                 for *NORMAL2,  the line  for *EXCEPTION,  and a  total
                 line for the day.

   PRTASP        Specifies which ASP  is to be printed.   If specified,
                 it must be  a number between 1 and  16.  You must have
                 specified PRTTYPE(*ASP).

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

   NBROFDAYS     Number  of days to  retain SYSHST records.   To retain
                 all  SYSHST  records   for  the  last   year,  specify
                 NBROFDAYS(365).  See also the DAYOFWEEK parameter.

   DAYOFWEEK     The day of  week to retain.  The  default is *NONE for
                 no  day of the week will  be retained for days outside
                 of the NBROFDAYS parameter.

                 Entering a value  such as *SUN, *MON  ...  allows  you
                 to reduce  the number of  records retained  for SYSHST
                 and  yet  to  still  be  able  to  provide  a  broader
                 historical  view  when   DSPSYSHST  is   used.     For
                 example,  if *MON  is  specified, all  Monday  records
                 would  be  retained regardless  of  whether they  were
                 within in the number of days specified or not.

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

You  must  have  *ALLOBJ  authority  to  use  STRSYSHST,  CAPSYSHST, or
MTNSYSHST.

Because  the  CAPSYSHST  command  is  intended  to  run  once  per  day
(shortly  after midnight),  the current  days information  will  not be
available when DSPSYSHST is used.

If  CAPSYSHST finds that multiple days have  not been captured, it will
create a  unique record  for each  day.   The job  information will  be
unique for  that day, but  the counts  and storage information  will be
identical in each record added.

Because   the  CPF1164  message   is  used   to  summarize  performance
information, a job is  considered to have run  entirely within the  day
that it is completed.

The CPF1164 message will have  a minimum of 1 second for CPU  time.  If
many  batch jobs are  run, this can  result in  a CPU usage  that would
exceed  24 hours a  day.  To  avoid this problem,  every 100 batch jobs
that have used  1 second of  CPU usage count as  1 second.   Because of
the system limitation,  the amount of CPU usage  can only be estimated.

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

The following TAA Tools must be on your system:

     ADDDAT2         Add date 2
     ADJVAR          Adjust variable
     CHGPUBAUT       Change public authority
     CHKALLOBJ       Check *ALLOBJ special authority
     CVTDAT          Convert date
     CRTDUPPF        Create duplicate physical file
     CVTJOBSCDE      Convert job schedule entry
     CVTQHST         Convert QHST
     CVTSYSLVL       Convert system level
     EDTVAR          Edit variable
     HLRMVMSG        HLL Remove message
     RSNLSTMSG       Resend last message
     RTNLIBL         Return library list
     RTVASPLST       Retrieve ASP list
     RTVASPSTS       Retrieve ASP status
     RTVDAT          Retrieve date
     RTVDATENTD      Retrieve date entry description
     RTVOBJLST       Retrieve object list
     RTVSPLFINF      Retrieve spooled file information
     RTVSYSSTS       Retrieve system status
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDSTSMSG       Send status message
     SNDESCMSG       Send escape message
     UPDPFILE        Update PFILE keyword

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

None,  the tool is  ready to  use.  For  the intended  use, specify the
STRSYSHST command.

File structure
--------------

      QGPL           TAA Member      Description
      ----           ----------      -----------

      SYSHSTP        TAASYTDP        Physical for base info
      SYSHSTS        TAASYTDS        Physical for ASP info
      SYSHSTL        TAASYTDK        LF over TAASYTDP by date
      SYSHSTT        TAASYTDT        LF over TAASYTDS Arrival seq

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

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

   CAPSYSHST     *CMD                   TAASYTD       QATTCMD
   DSPSYSHST     *CMD                   TAASYTD2      QATTCMD
   MTNSYSHST     *CMD                   TAASYTD3      QATTCMD
   STRSYSHST     *CMD                   TAASYTD4      QATTCMD
   TAASYTDC      *PGM       CLP         TAASYTDC      QATTCL
   TAASYTDC2     *PGM       CLP         TAASYTDC2     QATTCL
   TAASYTDC3     *PGM       CLP         TAASYTDC3     QATTCL
   TAASYTDC4     *PGM       CLP         TAASYTDC4     QATTCL
   TAASYTDC11    *PGM       CLP         TAASYTDC11    QATTCL
   TAASYTDC12    *PGM       CLP         TAASYTDC12    QATTCL
   TAASYTDC20    *PGM       CLP         TAASYTDC20    QATTCL
   TAASYTDC21    *PGM       CLP         TAASYTDC21    QATTCL
   TAASYTDC22    *PGM       CLP         TAASYTDC22    QATTCL
   TAASYTDC23    *PGM       CLP         TAASYTDC23    QATTCL
   TAASYTDC24    *PGM       CLP         TAASYTDC24    QATTCL
   TAASYTDC25    *PGM       CLP         TAASYTDC25    QATTCL
   TAASYTDR      *PGM       RPG         TAASYTDR      QATTRPG
   TAASYTDR2     *PGM       RPG         TAASYTDR2     QATTRPG
   TAASYTDR3     *PGM       RPG         TAASYTDR3     QATTRPG
   TAASYTDR10    *PGM       RPG         TAASYTDR10    QATTRPG
   TAASYTDR11    *PGM       RPG         TAASYTDR11    QATTRPG
   TAASYTDR12    *PGM       RPG         TAASYTDR12    QATTRPG
   TAASYTDR20    *PGM       RPG         TAASYTDR20    QATTRPG
   TAASYTDR22    *PGM       RPG         TAASYTDR22    QATTRPG
   TAASYTDD      *FILE      DSPF        TAASYTDD      QATTDDS
   TAASYTDE      *FILE      DSPF        TAASYTDE      QATTDDS
   TAASYTDP      *FILE      PF          TAASYTDP      QATTDDS
   TAASYTDK      *FILE      LF          TAASYTDK      QATTDDS
   TAASYTDQ      *FILE      PF          TAASYTDQ      QATTDDS
   TAASYTDS      *FILE      PF          TAASYTDS      QATTDDS
   TAASYTDT      *FILE      LF          TAASYTDT      QATTDDS

Structure
---------

CAPSYSHST   Cmd
   TAASYTDC   CL pgm
     TAASYTDR10  RPG Pgm  - Retrieves last date in SYSHSTP
     TAASYTDC11  CL pgm   - Retrieves counts of object types
     TAASYTDC12  CL pgm   - Retrieves PTF information
     TAASYTDR    RPG pgm  - Writes records to SYSHSTP
       TAASYTDR11  RPG pgm  - Accesses QHST records
         TAASYTDC21  CL pgm  - Accesses day of week name
         TAASYTDC20  CL pgm  - Accesses ASP information
           TAASYTDR20  CL pgm  - Writes ASP records

DSPSYSHST   Cmd
   TAASYTDC2   CL pgm
     TAASYTDR2   RPG Pgm  - Displays basic info with TAASYTDD
         TAASYTDD   DSPF
       TAASYTDC22  CL Pgm   - Convert Cum ID to a date
       TAASYTDC23  CL Pgm   - Converts IPL/powerdown information
       TAASYTDC24  CL Pgm   - Access QSPL information
       TAASYTDC25  CL Pgm   - Calculates RCLSTG elapsed time
       TAASYTDR22  RPG Pgm  - Displays ASP info with TAASYTDE
         TAASYTDE   DSPF
     TAASYTDR12  RPG Pgm  - Prints info
       TAASYTDC23  CL Pgm   - Converts IPL/powerdown information

MTNSYSHST   Cmd
   TAASYTDC3   CL pgm
     TAASYTDR3   RPG Pgm  - Does delete operations

STRSYSHST   Cmd
   TAASYTDC4   CL pgm
					

Added to TAA Productivity tools February 1, 2001


Home Page Up to Top