REXX Show ASVT                                                                                                goto homepage

Infos über ASVT (Address Space Vector Table) im Speicher finden – neue Version 2/2008

 

 

/* REXX */
/*                                       */
/*------------------------------------------------------*/
/* Copyright 2007-xx YCOS Yves Colliard Software GmbH   */
/*------------------------------------------------------*/
/* Show the ASVT                                        */
/*------------------------------------------------------*/
/* */
/*--------------------------------------------------------------------*/
/* ASVT: 00FB1018                                                     */
/* Maxuser 260                                                        */
/* ASVT Ptr  - Asid  /x'asid' - ASCB Ptr Type    Name             CPU */
/* 00FB1228  -      1/x'0001' - 00FCEE00 STC     *MASTER*         5.9 */
/* 00FB122C  -      2/x'0002' - 00FC2280 STC     PCAUTH           0.0 */
/* 00FB1230  -      3/x'0003' - 00FC2100 STC     RASP             0.0 */
/* ...                                                                
*/
/* 00FB125C  -     14/x'000E' - 00F4C500 STC     OMVS             3.2 */
/* 00FB1260  -     15/x'000F' - 80FB1228 UNSABLE Address Space!       */
/* 00FB1264  -     16/x'0010' - 00F4E700 STC     JESXCF           1.3 */
/* ...                                                                */
/* 00FB1284  -     24/x'0018' - 00F98480 USS     FTPD1            0.1 */
/* ...                                                                */
/* 00FB12AC  -     34/x'0022' - 00F98300 Batch   YVESW1           0.0 */
/* ...                                                                */
/* 00FB1344  -     72/x'0048' - 00FBF880 TSO     YVES            63.4 */
/* ...                                                                */
/* ------------------------------------------------------------       */
/* Maxuser    260                                                     */
/* STC         39  15.0%                                              */
/* InitBat      9   3.5%                                              */
/* InitUSS      1   0.4%                                              */
/* InitASCH    18   6.9%                                              */
/* Mount        0   0.0%                                              */
/* TSO          1   0.4%                                              */
/* Batch        1   0.4%                                              */
/* USS          2   0.8%                                              */
/* ASCH         0   0.0%                                              */
/* Free       188  72.3%                                              */
/* Unusable     1   0.4%                                              */
/*--------------------------------------------------------------------*/
/* */
/* */
Numeric digits 12                           /* dflt of 9 not enough  */
/* */
cvt     = PTR(76)       /*  4C                            PSACVT    */
asvt    = PTR(cvt+556)  /*  556     (22C)                 CVTASVT   */
say "ASVT:" d2x(asvt,8)
asvtmaxu= storage(d2x(asvt+516),4) /* 516     (204)       ASVTMAXU  */
say "Maxuser" c2d(asvtmaxu)
asvtmaxu = c2d(asvtmaxu)
asvtenty= asvt+528                 /* 528     (210)       ASVTENTY  */
unusable = b2x("1"substr(x2b(d2x(asvtenty,8)),2))
/* */
cunus    =0
cfree    =0
cstc     =0
cinit    =0
cibpx    =0
ciasch   =0
ctso     =0
cmnt     =0
cunk     =0
cbat     =0
cuss     =0
casch    =0
/* */
say "ASVT Ptr  - Asid  /x'asid' - ASCB Ptr Type    Name",
  "            CPU         SRB"
do i=1 to asvtmaxu
  ascb = storage(d2x(asvtenty),4)
  inf=d2x(asvtenty,8) " - " format(i,5,0)"/"
  inf=inf"x'"right("0000"d2x(i),4)"'" "-" c2x(ascb)
/*inf=inf c2x(storage(d2x(c2d(ascb)+36),2)) ascb asid! */
  if left(c2x(ascb),1)<>"8" then do
    ascb = c2d(ascb)
    jbni = ptr(ascb+172)   /* AC Pointer to Batch Job Name */
    jbns = ptr(ascb+176)   /* B0 Pointer to STC / TSO Name */
    tcb  =   "Y"storage(d2x(ascb+64),8)"Y"     /* x'40' */
    tcb  = x2d(substr(c2x(tcb),3,13))/1000/1000
    srb  =   "Y"storage(d2x(ascb+200),8)"Y"    /* x'C8' */
    srb  = x2d(substr(c2x(srb),3,13))/1000/1000
    inf2=format(tcb,9,1) format(srb,9,1)
    if jbni=0 then do
      oucb = ptr(ascb+144)   /* 90 Pointer to OUCB */
      oucbf = x2b(c2x(storage(d2x(oucb+18),1)))
      select
      when substr(oucbf,2,1)="1" then do
        select
        when storage(d2x(jbns),8) = "INIT" then do
          cinit  = cinit + 1
        end
        when storage(d2x(jbns),8) = "BPXAS" then do
          cibpx  = cibpx + 1
        end
        when storage(d2x(jbns),8) = "ASCHINT" then do
          ciasch = ciasch + 1
        end
        otherwise
          say inf" STC    " storage(d2x(jbns),8) inf2
          cstc  = cstc + 1
        end
      end
      when substr(oucbf,3,1)="1" then do
        say inf" TSO    " storage(d2x(jbns),8) inf2
        ctso  = ctso + 1
      end
      when substr(oucbf,4,1)="1" then do
        say inf" Mount  " storage(d2x(jbns),8) inf2
        cmnt  = cmnt + 1
      end
      otherwise
        say inf" ???    " storage(d2x(jbns),8) inf2
        cunk  = cunk + 1
      end
    end
    else do
      select
      when storage(d2x(jbns),8) = "INIT" then do
        say inf" Batch  " storage(d2x(jbni),8) inf2
        cbat  = cbat + 1
      end
      when storage(d2x(jbns),8) = "BPXAS" then do
        say inf" USS    " storage(d2x(jbni),8) inf2
        cuss  = cuss + 1
      end
      when storage(d2x(jbns),8) = "ASCHINT" then do
        say inf" ASCH   " storage(d2x(jbni),8) inf2
        casch = casch + 1
      end
      otherwise
        say inf" ???    " storage(d2x(jbni),8) inf2
        cunk  = cunk + 1
      end
    end
  end
  else do
    if unusable = c2x(ascb) then do
      say inf" UNSABLE Address Space!"
        cunus = cunus + 1
    end
    else do
      /* Comment Start
      say inf" Free Address Space"
         Comment End */
        cfree = cfree + 1
    end
  end
  asvtenty=asvtenty+4
end
say copies("-",60)
say "Maxuser " format(asvtmaxu,5)
say "STC     " format(cstc,5)  format(cstc /asvtmaxu*100,3,1)"%"
say "InitBat " format(cinit,5) format(cinit/asvtmaxu*100,3,1)"%"
say "InitUSS " format(cibpx,5) format(cibpx/asvtmaxu*100,3,1)"%"
say "InitASCH" format(ciasch,5) format(ciasch/asvtmaxu*100,3,1)"%"
say "Mount   " format(cmnt,5)  format(cmnt /asvtmaxu*100,3,1)"%"
say "TSO     " format(ctso,5)  format(ctso /asvtmaxu*100,3,1)"%"
say "Batch   " format(cbat,5)  format(cbat /asvtmaxu*100,3,1)"%"
say "USS     " format(cuss,5)  format(cuss /asvtmaxu*100,3,1)"%"
say "ASCH    " format(casch,5) format(casch/asvtmaxu*100,3,1)"%"
say "Free    " format(cfree,5) format(cfree/asvtmaxu*100,3,1)"%"
say "Unusable" format(cunus,5) format(cunus/asvtmaxu*100,3,1)"%"
if cunk>0 then say "Unknown "
exit
/*--------------------------------------------------------------------*/
PTR: RETURN C2D(BITAND(STORAGE(D2X(ARG(1)),4),'7FFFFFFF'X))
PTR24: RETURN C2D(BITAND(STORAGE(D2X(ARG(1)),4),'00FFFFFF'X))
/*--------------------------------------------------------------------*/


Resultat:

ASVT: 00FB1018                                                               
Maxuser 260                                                                   
ASVT Ptr  - Asid  /x'asid' - ASCB Ptr Type    Name             CPU         SRB
00FB1228  -      1/x'0001' - 00FCEE00 STC     *MASTER*         6.8         5.5
00FB122C  -      2/x'0002' - 00FC2280 STC     PCAUTH           0.0         0.0
00FB1230  -      3/x'0003' - 00FC2100 STC     RASP             0.0         0.4
00FB1234  -      4/x'0004' - 00F4CB00 STC     TRACE            0.0         0.0
00FB1238  -      5/x'0005' - 00F4C980 STC     DUMPSRV          0.3         0.0
00FB123C  -      6/x'0006' - 00F4C800 STC     XCFAS           13.9         0.3
...
00FB125C  -     14/x'000E' - 00F4C500 STC     OMVS             3.5         0.6
00FB1260  -     15/x'000F' - 80FB1228 UNSABLE Address Space!                  
00FB1264  -     16/x'0010' - 00F4E700 STC     JESXCF           1.5         0.4
...
00FB1280  -     23/x'0017' - 00F4C080 STC     LLA              6.5         0.4
00FB1284  -     24/x'0018' - 00F98480 USS     FTPD1            0.1         0.0
00FB1288  -     25/x'0019' - 00F4BD00 STC     JES2            20.0         1.4
...
00FB12A8  -     33/x'0021' - 00F98680 STC     BPXOINIT         0.4         0.1
00FB12AC  -     34/x'0022' - 00F98300 Batch   YVESW1           0.0         0.0
00FB12D4  -     44/x'002C' - 00F97100 STC     TNF              0.0         0.0
...
00FB1300  -     55/x'0037' - 00F95700 STC     NFSS             1.3         0.3
00FB1344  -     72/x'0048' - 00FBF880 TSO     YVES            96.2         2.0
00FB1348  -     73/x'0049' - 00FBE380 STC     PORTMAP          0.2         0.0
00FB1610  -    251/x'00FB' - 00F9C180 STC     JES2AUX          0.0         0.0
------------------------------------------------------------                  
Maxuser    260                                                                 
STC         39  15.0%                                                         
InitBat      9   3.5%                                                         
InitUSS      1   0.4%                                                          
InitASCH    18   6.9%                                                         
Mount        0   0.0%                                                         
TSO          1   0.4%                                                         
Batch        1   0.4%                                                         
USS          2   0.8%                                                         
ASCH         0   0.0%                                                         
Free       188  72.3%                                                         
Unusable     1   0.4%