
                               					20-May-1983 10:17:41	VAX-11 FORTRAN V3.2-37              Page   1
								10-May-1983 10:44:14	[GARY.STATS.SOURCE]STATSWAP.FOR;30          

0001    !
0002    !			  COPYRIGHT (c) 1982 BY
0003    !	      MOSTEK CORPORATION, CARROLLTON TX
0004    !
0005    ! This software is furnished under a license and may be used and  copied
0006    ! only  in  accordance  with  the  terms  of  such  license and with the
0007    ! inclusion of the above copyright notice.  This software or  any  other
0008    ! copies  thereof may not be provided or otherwise made available to any
0009    ! other person.  No title to and ownership of  the  software  is  hereby
0010    ! transferred.
0011    !
0012    ! The information in this software is subject to change  without  notice
0013    ! and  should  not  be  construed  as  a commitment by MOSTEK
0014    ! CORPORATION.
0015    !
0016    ! MOSTEK assumes no responsibility for the use or  reliability  of  its
0017    ! software on equipment which is not supplied by MOSTEK.
0018    !
0019     
0020    !++
0021    ! FACILITY:
0022    !   MOSTEK CORPORATION
0023    !
0024    ! ABSTRACT:
0025    !   STATSWAP chases down all the swap statistics. In version 3.0 of
0026    !   VMS, swapping is supposedly going away. This may become excess
0027    !   baggage.
0028    !
0029    ! ENVIRONMENT:
0030    !   VAX11 VMS
0031    !
0032    ! AUTHOR: Gary Smith, CREATION DATE: 6/24/82
0033    !
0034    ! MODIFIED BY:
0035    !
0036    !--
0037    !
0038    ! TABLE OF CONTENTS:
0039    !
0040    !
0041    ! INCLUDE FILES:
0042    !   mousesubs.for
0043    !   defrec.for
0044    !
0045    ! MACROS:
0046    !   none
0047    !
0048    ! EQUATED SYMBOLS:
0049    !   see mousesubs.for
0050    !
0051    ! EXTERNAL REFERENCES:
0052    !   SWP$GL_ISPAGCNT     Inswap page count
0053    !   SWP$GL_ISWPCNT      Count of inswap performed
0054    !   SCH$GW_PROCCNT      Count of processes that require swap file
0055    !   SWP$GL_OSWPCNT      Count of outswaps performed
0056    !   SWP$GL_HOSWPCNT     Count of header outswaps
0057    !   SWP$GL_HISWPCNT     Count of header inswaps

                               					20-May-1983 10:17:41	VAX-11 FORTRAN V3.2-37              Page   2
								10-May-1983 10:44:14	[GARY.STATS.SOURCE]STATSWAP.FOR;30          

0058    !
0059     
0060    !++
0061    ! FUNCTIONAL DESCRIPTION:
0062    !   STATSWAP grabs the information about swapping that is going on
0063    !   in the system.
0064    !
0065    !
0066    ! FORMAL PARAMETERS:
0067    !   none
0068    !
0069    !
0070    ! IMPLICIT INPUTS:
0071    !   swap
0072    !
0073    !
0074    ! IMPLICIT OUTPUTS:
0075    !   swap
0076    !
0077    !
0078    ! ROUTINE VALUE and
0079    ! COMPLETION CODES:
0080    !   none
0081    !
0082    !
0083    ! SIDE EFFECTS:
0084    !   none to date
0085    !
0086    !
0087    !--
0088              SUBROUTINE STATSWAP     !! Stats on swapping
0089     
0090              external SWP$GL_ISPAGCNT  !! Inswap page count
0091              external SWP$GL_ISWPCNT   !! Count of inswap performed
0092              external SCH$GW_PROCCNT   !! Count of processes that require swap file
0093              external SWP$GL_OSWPCNT   !! Count of outswaps performed
0094              external SWP$GL_HOSWPCNT  !! Count of header outswaps
0095              external SWP$GL_HISWPCNT  !! Count of header inswaps
0096     
0097              include 'mousesubs.for'
0300              include 'defrec.for'
0402     
0403              integer last(swap_size), temp
0404     
0405    !++
0406    ! grap up the swapping stats
0407    !__
0408              rec_swap(ispagcnt) = ML$L_PEEK(%LOC(SWP$GL_ISPAGCNT))
0409              rec_swap(iswpcnt ) = ML$L_PEEK(%LOC(SWP$GL_ISWPCNT ))
0410              rec_swap(proccnt ) = ML$L_PEEK(%LOC(SCH$GW_PROCCNT )) .and. 
0411         .                     'ffff'x
0412              rec_swap(oswpcnt ) = ML$L_PEEK(%LOC(SWP$GL_OSWPCNT ))
0413              rec_swap(hoswpcnt) = ML$L_PEEK(%LOC(SWP$GL_HOSWPCNT))
0414              rec_swap(hiswpcnt) = ML$L_PEEK(%LOC(SWP$GL_HISWPCNT))
0415     
0416    !++
0417    ! Compute the delta from the last time. Note the special casing for

STATSWAP                       					20-May-1983 10:17:41	VAX-11 FORTRAN V3.2-37              Page   3
								10-May-1983 10:44:14	[GARY.STATS.SOURCE]STATSWAP.FOR;30          

0418    ! ispagcnt and proccnt
0419    !--
0420     
0421              do i = 1, swap_size - swap_spares
0422                 if ( (i .ne. ispagcnt) .and. (i .ne. proccnt) ) then
0423                    temp = rec_swap(i)
0424                    rec_swap(i) = rec_swap(i) - last(i)
0425                    last(i) = temp
0426                 end if
0427              end do
0428     
0429              return 
0430              end




PROGRAM SECTIONS

    Name				 Bytes   Attributes

  0 $CODE                                  239   PIC CON REL LCL   SHR   EXE   RD NOWRT LONG
  2 $LOCAL                                  52   PIC CON REL LCL NOSHR NOEXE   RD   WRT LONG
  3 REC_COMMON                             348   PIC OVR REL GBL   SHR NOEXE   RD   WRT LONG

    Total Space Allocated                  639


ENTRY POINTS

    Address  Type  Name                                        References

  0-00000000       STATSWAP                                       88     


VARIABLES

    Address  Type  Name                            Attributes  References

  2-00000028  I*4  I                                             421=      422(2)    423       424(3)    425     
  3-00000108  I*4  REC_RESPONSE                    COMM EQUIV    303       360     
  2-00000024  I*4  TEMP                                          403       423=      425     


ARRAYS

    Address  Type  Name                            Attributes        Bytes  Dimensions       References

  2-00000000  I*4  LAST                                                36  (9)                 403       424       425=    
  3-00000000  I*4  REC_CPU_MODES                   COMM EQUIV          36  (9)                 305       317     
  3-00000024  I*4  REC_FCP                         COMM EQUIV          20  (5)                 311       324     
  3-00000120  I*4  REC_LOCK_MODES                  COMM EQUIV          28  (7)                 313       379     
  3-00000080  I*4  REC_MEM_MODES                   COMM EQUIV           8  (2)                 306       329     

  3-00000038  I*4  REC_MISC                        COMM EQUIV          72  (18)                308       326     
  3-0000010C  I*4  REC_NET_MODES                   COMM EQUIV          20  (5)                 312       369     
  3-00000088  I*4  REC_PGFLT                       COMM EQUIV          28  (7)                 310       333     

STATSWAP                       					20-May-1983 10:17:41	VAX-11 FORTRAN V3.2-37              Page   4
								10-May-1983 10:44:14	[GARY.STATS.SOURCE]STATSWAP.FOR;30          

  3-0000013C  I*4  REC_POOL_MODES                  COMM EQUIV          32  (8)                 314       390     
  3-000000A4  I*4  REC_SCH_STATE                   COMM EQUIV          56  (14)                309       338     

  3-000000DC  I*4  REC_SWAP                        COMM EQUIV          36  (9)                 307       344       408=    
											       409=      410=      412=    
											       413=      414=      423     
											       424(2)= 
  3-00000100  I*4  REC_TIME                        COMM EQUIV           8  (2)                 304       351     
  3-00000000  I*4  STATS_REC                       COMM EQUIV         348  (87)                301       315       317     
											       324       326       329     
											       333       338       344     
											       351       360       369     
											       379       390     


PARAMETER CONSTANTS

  Type  Name                                                   References

   I*2  ARRLOCPK                                                 244#    
   I*2  ARRTRAPK                                                 245#    
   CHAR ASCII_DELTA_TIME                                         102       103#    
   I*2  BIGHOLE                                                  278#    
   I*2  BJOBCNT                                                  134#    

   I*2  BUFIO                                                    155#    
   I*2  CEF                                                      201#    
   I*2  COLPG                                                    199#    
   I*2  COM                                                      210#    
   I*2  COMO                                                     211#    

   I*2  COMPAT                                                   132#    
   I*2  CPU_SIZE                                                 137#      294       305       324       326       329     
							         333       338       344       351       360       369     
							         379       390     
   I*2  CUR                                                      212#    
   I*2  DEPLOCPK                                                 246#    
   I*2  DEQ                                                      260#    

   I*2  DIRHIT                                                   164#    
   I*2  DIRIO                                                    154#    
   I*2  DIRMISS                                                  165#    
   I*2  DLCKFND                                                  261#    
   I*2  DLCKSRCH                                                 262#    

   I*2  DZROFLTS                                                 186#    
   I*2  ENQCVT                                                   263#    
   I*2  ENQNEW                                                   258#    
   I*2  ENQNOTQD                                                 264#    
   I*2  ENQWAIT                                                  259#    

   I*2  EXEC                                                     129#    
   I*2  EXTHIT                                                   166#    
   I*2  EXTMISS                                                  167#    
   I*2  FAULTS                                                   187#    
   I*2  FCP_CACHE                                                144#    


STATSWAP                       					20-May-1983 10:17:41	VAX-11 FORTRAN V3.2-37              Page   5
								10-May-1983 10:44:14	[GARY.STATS.SOURCE]STATSWAP.FOR;30          

   I*2  FCP_CALLS                                                143#    
   I*2  FCP_CPU                                                  145#    
   I*2  FCP_READ                                                 146#    
   I*2  FCP_SIZE                                                 149#      294       311       326       329       333     
							         338       344       351       360       369       379     
							         390     
   I*2  FCP_WRITE                                                147#    

   I*2  FIDHIT                                                   168#    
   I*2  FIDMISS                                                  169#    
   I*2  FPG                                                      209#    
   I*2  FREECNT                                                  178#    
   I*2  GETDVI_EF                                                117#    

   I*2  HIB                                                      205#    
   I*2  HIBO                                                     206#    
   I*2  HISWPCNT                                                 224#      414     
   I*2  HIT                                                      161#    
   I*2  HOLECNT                                                  277#    

   I*2  HOLESUM                                                  281#    
   I*2  HOSWPCNT                                                 223#      413     
   I*2  IDLE                                                     133#    
   I*2  IJOBCNT                                                  135#    
   I*2  INT                                                      131#    

   I*2  IRPCNT                                                   276#    
   I*2  ISPAGCNT                                                 219#      408       422     
   I*2  ISWPCNT                                                  220#      409     
   I*2  KERNEL                                                   127#    
   I*2  KEY_SIZE                                                 123#    

   I*2  LEF                                                      203#    
   I*2  LEFO                                                     204#    
   I*2  LOCK_SIZE                                                269#      294       313       390     
   I*2  LOGNAM                                                   156#    
   I*2  LRPCNT                                                   282#    

   I*2  MBREADS                                                  157#    
   I*2  MBWRITES                                                 158#    
   I*2  MEM_SIZE                                                 181#      294       306       333       338       344     
							         351       360       369       379       390     
   I*2  MFYCNT                                                   179#    
   I*2  MISC_SIZE                                                173#      294       308       329       333       338     
							         344       351       360       369       379       390     

   I*2  MWAIT                                                    200#    
   I*2  NET_SIZE                                                 253#      294       312       379       390     
   I*2  NUM_MODES                                                138#    
   I*2  OPEN                                                     163#    
   I*2  OPENS                                                    162#    

   I*2  OSWPCNT                                                  222#      412     
   I*2  PFW                                                      202#    
   I*2  PGFLT_SIZE                                               194#      294       310       338       344       351     
							         360       369       379       390     
   I*2  POOL_SIZE                                                289#      294       314     

STATSWAP                       					20-May-1983 10:17:41	VAX-11 FORTRAN V3.2-37              Page   6
								10-May-1983 10:44:14	[GARY.STATS.SOURCE]STATSWAP.FOR;30          

   I*2  PREADIO                                                  188#    

   I*2  PREADS                                                   190#    
   I*2  PROCCNT                                                  221#      410       422     
   I*2  PWRITES                                                  191#    
   I*2  PWRITIO                                                  189#    
   I*2  QUOHIT                                                   170#    

   I*2  QUOMISS                                                  171#    
   I*2  RCVBUFFL                                                 247#    
   I*2  RDFLTS                                                   192#    
   I*2  REC_SIZE                                                 294#      315     
   I*2  RES                                                      239#    

   I*2  RESPONSE_SIZE                                            238#      294       369       379       390     
   I*2  SCH_SIZE                                                 214#      294       309       344       351       360     
							         369       379       390     
   I*2  SMALLCNT                                                 280#    
   I*2  SMALLHOLE                                                279#    
   I*2  SPLIT                                                    160#    

   I*2  SRPCNT                                                   283#    
   CHAR STANDARD_NEST_FILE                                       109       110#    
   I*2  SUPER                                                    128#    
   I*2  SUSP                                                     207#    
   I*2  SUSPO                                                    208#    

   I*2  SWAP_SIZE                                                226#      294       307       351       360       369     
							         379       390       403       421     
   I*2  SWAP_SPARES                                              227#      421     
   I*2  TIME_SIZE                                                232#      294       304       360       369       379     
							         390     
   I*2  TRCNGLOS                                                 248#    
   I*2  TURN                                                     159#    

   I*2  USER                                                     130#    
   I*2  WAIT_EF                                                  116#    


FUNCTIONS AND SUBROUTINES REFERENCED

  Type  Name                                                   References

   I*4  ML$L_PEEK                                                408       409       410       412       413       414     
        SCH$GW_PROCCNT                                            92       410     
        SWP$GL_HISWPCNT                                           95       414     
        SWP$GL_HOSWPCNT                                           94       413     
        SWP$GL_ISPAGCNT                                           90       408     

        SWP$GL_ISWPCNT                                            91       409     
        SWP$GL_OSWPCNT                                            93       412     

STATSWAP                       					20-May-1983 10:17:41	VAX-11 FORTRAN V3.2-37              Page   7
								10-May-1983 10:44:14	[GARY.STATS.SOURCE]STATSWAP.FOR;30          

  +----------------------------------------------+
  |           KEY TO REFERENCE FLAGS             |
  |   =   - Value Modified                       |
  |   #   - Defining Reference                   |
  |   A   - Actual Argument, possibly modified   |
  |   D   - Data Initialization                  |
  |  (n)  - Number of occurrences on line        |
  +----------------------------------------------+



COMMAND QUALIFIERS

  FORTRAN /DEBUG/OBJECT=OBJ:STATSWAP/LIST=LIS:STATSWAP/CONT=99/CROSS/NOOPT SRC:STATSWAP

  /CHECK=(NOBOUNDS,OVERFLOW,NOUNDERFLOW)
  /DEBUG=(SYMBOLS,TRACEBACK)
  /STANDARD=(NOSYNTAX,NOSOURCE_FORM)
  /SHOW=(NOPREPROCESSOR,NOINCLUDE,MAP)
  /F77  /NOG_FLOATING  /I4  /NOOPTIMIZE  /WARNINGS  /NOD_LINES  /CROSS_REFERENCE  /NOMACHINE_CODE  /CONTINUATIONS=99


COMPILATION STATISTICS

  Run Time:           2.47 seconds
  Elapsed Time:       6.71 seconds
  Page Faults:        451
  Dynamic Memory:     843 pages
