From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 27-JUN-1989 17:06
To:	MRGATE::"ARISIA::EVERHART"
Subj:	Pool usage and parameter report generators

Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Tue, 27 JUN 89 11:45:05 PDT
Received: from LBL.Gov (LBL.ARPA) by KL.SRI.COM with TCP; Tue, 27 Jun 89 11:25:16 PDT
Received: from warner.hepnet by LBL.Gov with VMSmail ;
	Tue, 27 Jun 89 11:23:42 PDT
Date:    Tue, 27 Jun 89 11:23:42 PDT
From: nagy%warner.hepnet@LBL.Gov (Frank J. Nagy/VAX Guru&Wizard)
Message-Id: <890627112342.29004e22@LBL.Gov>
Subject: Pool usage and parameter report generators
To: Info-VAX@kl.sri.com
X-St-Vmsmail-To: info_vax

This VMS_SHARE package contains two procedures I recently wrote to assist
me in tuning memory pool parameters on our large LAVCs (31 and 20 nodes
respectively).  POOL_USAGE_REPORT generates a one page report, one node
per line, with the pool information digested from SHOW MEMORY /All /FULL.
POOL_PARAMS_REPORT generates a similar report on 10 system parameters
concerned with nonpaged pool sizes by reading all the SETPARAMS.DAT
files on the system disk(s).  I have found both of these procedures
useful in tuning our large LAVCs where many nodes are similar (and have
similar memory usage and setup parameters).

= Dr. Frank J. Nagy   "VAX Guru & Wizard"
= Fermilab Research Division/Electrical and Electronics Dept/Controls Group
= HEPNET: WARNER::NAGY (43198::NAGY) or FNAL::NAGY (43009::NAGY)
= BitNet: NAGY@FNAL
= USnail: Fermilab POB 500 MS/220 Batavia, IL 60510

$! ................... Cut between dotted lines and save. ...................
$!...........................................................................
$! VAX/VMS archive file created by VMS_SHARE V06.10 7-FEB-1989.
$!
$! VMS_SHARE was written by James Gray (Gray:OSBUSouth@Xerox.COM) from
$! VMS_SHAR by Michael Bednarek (U3369429@ucsvc.dn.mu.oz.au).
$!
$! To unpack, simply save, concatinate all parts into one file and
$! execute (@) that file.
$!
$! This archive was created by user NAGY
$! on 27-JUN-1989 13:18:18.29.
$!
$! It contains the following 2 files:
$!        POOL_PARAMS_REPORT.COM
$!        POOL_USAGE_REPORT.COM
$!
$!============================================================================
$ SET SYMBOL/SCOPE=( NOLOCAL, NOGLOBAL )
$ VERSION = F$GETSYI( "VERSION" )
$ IF VERSION .GES "V4.4" THEN GOTO VERSION_OK
$ WRITE SYS$OUTPUT "You are running VMS ''VERSION'; ", -
    "VMS_SHARE V06.10 7-FEB-1989 requires VMS V4.4 or higher."
$ EXIT 44 ! SS$_ABORT
$VERSION_OK:
$ GOTO START
$!
$UNPACK_FILE:
$ WRITE SYS$OUTPUT "Creating ''FILE_IS'"
$ DEFINE/USER_MODE SYS$OUTPUT NL:
$ EDIT/TPU/COMMAND=SYS$INPUT/NODISPLAY/OUTPUT='FILE_IS'/NOSECTION -
    VMS_SHARE_DUMMY.DUMMY
b_part := CREATE_BUFFER( "{Part}", GET_INFO( COMMAND_LINE, "file_name" ) )
; s_file_spec := GET_INFO( COMMAND_LINE, "output_file" ); SET( OUTPUT_FILE
, b_part, s_file_spec ); b_errors := CREATE_BUFFER( "{Errors}" ); i_errors 
:= 0; pat_beg_1 := ANCHOR & "-+-+-+ Beginning"; pat_beg_2 := LINE_BEGIN 
& "+-+-+-+ Beginning"; pat_end := ANCHOR & "+-+-+-+-+ End"; POSITION
( BEGINNING_OF( b_part ) ); LOOP EXITIF SEARCH( SPAN( ' ' )@r_trail 
& LINE_END, FORWARD) = 0; POSITION( r_trail ); ERASE( r_trail ); ENDLOOP
; POSITION( BEGINNING_OF( b_part ) ); i_append_line := 0; LOOP EXITIF MARK
( NONE ) = END_OF( b_part ); s_x := ERASE_CHARACTER( 1 )
; IF s_x = '+' THEN r_skip := SEARCH( pat_beg_1, FORWARD, EXACT ); IF r_skip 
<> 0 THEN s_x := ''; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ERASE_LINE; ENDIF
; ENDIF; IF s_x = '-' THEN r_skip := SEARCH( pat_end, FORWARD, EXACT )
; IF r_skip <> 0 THEN s_x := ''; MOVE_HORIZONTAL( -CURRENT_OFFSET ); m_skip 
:= MARK( NONE ); r_skip := SEARCH( pat_beg_2, FORWARD, EXACT ); IF r_skip 
<> 0 THEN POSITION( END_OF( r_skip ) ); MOVE_HORIZONTAL( -CURRENT_OFFSET )
; MOVE_VERTICAL( 1 ); MOVE_HORIZONTAL( -1 ); ELSE POSITION( END_OF( b_part ) 
); ENDIF; ERASE( CREATE_RANGE( m_skip, MARK( NONE ), NONE ) ); ENDIF; ENDIF
; IF s_x = 'V' THEN s_x := ''; IF i_append_line <> 0 THEN APPEND_LINE
; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ENDIF; i_append_line := 1
; MOVE_VERTICAL( 1 ); ENDIF; IF s_x = 'X' THEN s_x := ''; IF i_append_line 
<> 0 THEN APPEND_LINE; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ENDIF
; i_append_line := 0; MOVE_VERTICAL( 1 ); ENDIF; IF s_x <> '' THEN i_errors 
:= i_errors + 1; s_text := CURRENT_LINE; POSITION( b_errors ); COPY_TEXT
( "The following line could not be unpacked properly:" ); SPLIT_LINE
; COPY_TEXT( s_x ); COPY_TEXT( s_text ); POSITION( b_part ); MOVE_VERTICAL
( 1 ); ENDIF; ENDLOOP; POSITION( BEGINNING_OF( b_part ) ); LOOP r_x := SEARCH
( "`", FORWARD, EXACT ); EXITIF r_x = 0; POSITION( r_x ); ERASE_CHARACTER( 1 
); COPY_TEXT( ASCII( INT( ERASE_CHARACTER( 3 ) ) ) ); ENDLOOP
; IF i_errors = 0 THEN SET( NO_WRITE, b_errors, ON ); ELSE POSITION
( BEGINNING_OF( b_errors ) ); COPY_TEXT( FAO
( "The following !UL errors were detected while unpacking !AS", i_errors
, s_file_spec ) ); SPLIT_LINE; SET( OUTPUT_FILE, b_errors, "SYS$COMMAND" )
; ENDIF; EXIT; 
$ DELETE VMS_SHARE_DUMMY.DUMMY;*
$ CHECKSUM 'FILE_IS
$ WRITE SYS$OUTPUT " CHECKSUM ", -
  F$ELEMENT( CHECKSUM_IS .EQ. CHECKSUM$CHECKSUM, ",", "failed!!,passed." )
$ RETURN
$!
$START: 
$ FILE_IS = "POOL_PARAMS_REPORT.COM"
$ CHECKSUM_IS = 570788982
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
V$!.. POOL_PARAMS_REPORT.COM`009    Prepare pool parameters report for all nod
Xes
X$!.. Description/history at end of file.
X$!
X$! Setup symbols with name of parameters to report on
X$!`032
V$ p_list = "IRPCOUNT,SRPCOUNT,LRPCOUNT,NPAGEDYN,PAGEDYN,LOCKIDTBL,RESHASHTBL,
X"
X$ p_list = p_list + "GBLSECTIONS,GBLPAGES,GBLPAGFIL"
X$ p_len = F$Length(p_list)
X$!
X$! Setup other stuff...
X$!
X$ Type Sys$Input:
X
X The following questions allow changing the location of the
X POOL_PARAMS.RPT (report) file to a different disk/directory area
X and substituting a different PRINT queue name.  If the reply to
X the PRINT question is "/NONE", then usage report will not be
X printed automatically.  If a new queue name is entered, PRINT
X qualifiers (such as /SETUP=name, /FORM=name, /DELETE, etc.) can
X follow the file name (as in "WH12X_TAL800 /SETUP=S814L).
X
X$ rpt_dest = "TMP$:"
X$ If F$Trnlnm( rpt_dest - ":") .eqs. "" Then rpt_dest = "SYS$MANAGER:"
X$ Inquire   ans`009"POOL_PARAMS.RPT location [D=''rpt_dest']"
X$ If ans .nes. "" Then rpt_dest = ans
X$ qsf = "SYS$PRINT"
X$ Inquire   ans`009"PRINT queue name and qualifiers [D=''qsf']"
X$ If ans .nes. "" Then qsf = ans
X$ If qsf .eqs. "/NONE" Then qsf = ""`009!Do not PRINT file
X$!
X$ num_nodes = 0
X$ sysdev = "SYS$SYSDEVICE:"
X$ If p1 .eqs. "" Then p1 = ";0"
X$ On Error Then $ GoTo Pass1Done
X$ Open /Write`009IO_REPORT`009SYS$SCRATCH:REPORT.TMP
X$Pass1Loop:
X$   file = F$Search( sysdev + "[SYS*.SYSEXE]SETPARAMS.DAT" + p1)
X$   If file .eqs. "" Then $ GoTo Pass1Done
X$   Open /Read`009IO_SETPAR`009'file'
X$   Write Sys$Output`009" Reading file ",file
X$Pass1Inner:
X$`009Read /End_Of_File=Inner1Done`009IO_SETPAR   line
X$`009line = F$Edit(line,"TRIM,COMPRESS")
X$`009If F$Edit(F$Element(0," ",line),"UPCASE") .nes. "SET" Then -
X`009    GoTo Pass1Inner
X$`009pname = F$Edit(F$Element(1," ",line),"UPCASE")
X$`009If pname .eqs. "SCSNODE"
X$`009Then
X$`009    node = F$Element( 2, " ", line) - """" - """"
X$`009Else
X$`009    If F$Locate(pname,p_list) .lt. p_len
X$`009    Then
X$`009`009'pname' = F$Integer(F$Element(2," ",line))
X$`009    EndIf
X$`009EndIf
X$`009GoTo Pass1Inner
X$Inner1Done:
X$   Close IO_SETPAR
X$   line = F$Fao( "!6AS    !10(12UL)", node, -
X`009`009`009   srpcount, irpcount, lrpcount, -
X`009`009`009   npagedyn, pagedyn, -
X`009`009`009   lockidtbl, reshashtbl, -
X`009`009`009   gblsections, gblpages, gblpagfil)
X$   Write IO_REPORT   line
X$   num_nodes = num_nodes + 1
X$   GoTo Pass1Loop
X$Pass1Done:
X$ If F$Trnlnm( "IO_SHOMEM") .nes. "" Then $ Close   IO_SETPAR
X$ If sysdev .eqs. "SYS$SYSDEVICE:"
X$ Then
X$   If F$Trnlnm( "SYS_SYSOTHER") .nes. ""
X$   Then
X$`009sysdev = "SYS_SYSOTHER:"
X$`009On Error Then $ GoTo Pass1Done
X$`009GoTo Pass1Loop
X$   EndIf
X$ EndIf
X$ If F$Trnlnm( "IO_REPORT") .nes. "" Then $ Close   IO_REPORT
X$ On Error Then $ GoTo ExitHere
X$ Write Sys$Output  " Processed SETPARAMS.DAT files for ",num_nodes," nodes."
X$!
X$! Alphabetize by node name, add headings and print
X$!
V$ SORT /KEY=(POSITION:1,SIZE:6)`009SYS$SCRATCH:REPORT.TMP`009SYS$SCRATCH:REPO
XRT.TMP
X$!
X$ Open /WRITE`009IO_FINALRPT 'rpt_dest'POOL_PARAMS.RPT
X$ cluster = F$Trnlnm( "SYS$CLUSTER_NODE") - "::"
X$ line = F$Fao( -
X    "!_Parameters report for !AS files [SYS*.SYSEXE]SETPARAMS.DAT!AS!/", -
X    cluster, p1)
X$ Write`009IO_FINALRPT   line
X$ line = F$Fao( "!6*     !10(12AS)",-
X`009`009`009   "   SRPCOUNT", "   IRPCOUNT", "   LRPCOUNT",-
X`009`009`009   "   NPAGEDYN", "    PAGEDYN", -
X`009`009`009   "  LOCKIDTBL", " RESHASHTBL", -
X`009`009`009   " GBLSECTIONS", "   GBLPAGES", "  GBLPAGFIL")
X$ Write IO_FINALRPT   line
X$ s9 = F$Fao( "!3* !9*-")
X$ line = F$Fao( "!6*     !10(12AS)", s9, s9, s9, s9, s9, s9, s9, s9, s9, s9)
X$ Write IO_FINALRPT   line
X$!
X$ n = 0`009`009`009`009!# of lines
X$ Open /Read`009IO_PARTIAL  SYS$SCRATCH:REPORT.TMP
X$Pass2Loop:
X$   Read /End_Of_File=Pass2Done`009IO_PARTIAL  line
X$   n = n + 1
X$   Write IO_FINALRPT  line
X$   modulo = n - 5*(n/5)
X$   If modulo .ne. 0 Then $ GoTo Pass2Loop
X$   line = F$Fao( "!130*-")
X$   Write IO_FINALRPT  line
X$   GoTo Pass2Loop
X$Pass2Done:
X$ Close`009IO_PARTIAL
X$ Close`009IO_FINALRPT
X$!
X$ If qsf .nes. "" Then $ PRINT /QUEUE='qsf'`009'rpt_dest'POOL_PARAMS.RPT
X$ExitHere:
X$ DELETE SYS$SCRATCH:REPORT.TMP;*
X$ EXIT`009
V$!===========================================================================
X==
X$!+ POOL_PARAMETERS_REPORT
X$! This procedure prepares and prints a report of the memory pool system
X$! parameters for all nodes in the cluster.  The purpose is to guide
X$! modifications to MODPARAMS.DAT files for new AUTOGEN runs.
X$!
X$!`009@RDCS$MGR_UTIL:POOL_PARAMS_REPORT  [version]
X$!
X$! The program uses as input all the SETPARAMS.DAT files in the [SYS*.SYSEXE]
V$! areas on SYS$SYSDEVICE (and SYS_SYSOTHER, if that logical name is defined)
X.
X$! The files are processed and a single page report is prepared and printed.
X$! The report will also be left as file TMP$:PAGE_PARAMS.RPT.
X$!
X$! The optional parameter selects the SETPARAMS.DAT file version to be used.
X$! The default is ";0", usually the only other meaningful values are ";-1"
X$! or ";-0".
X$!-
V$!===========================================================================
X==
X$! Modifications:
X$!  19-Jun-89`009FJN`009Created from POOL_USAGE_REPORT.COM
X$!  26-Jun-89`009FJN`009Same changes as POOL_USAGE_REPORT.COM to become a
X$!`009`009`009generic (any VAX) procedure
$ GOSUB UNPACK_FILE

$ FILE_IS = "POOL_USAGE_REPORT.COM"
$ CHECKSUM_IS = 724112940
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X$!.. POOL_USAGE_REPORT.COM`009    Prepare pool usage report for all nodes
X$!.. Description/history at end of file.
X$ keep_input = "TRUE"
X$ If p1 .nes. "" Then $ GoTo ProcessFile
X$ Inquire   p1`009"File with SHOW MEMORY from all nodes"
X$!
X$! Setup other stuff...
X$!
X$ Type Sys$Input:
X
X The following questions allow changing the location of the
X POOL_USAGE.RPT (report) file to a different disk/directory area
X and substituting a different PRINT queue name.  If the reply to
X the PRINT question is "/NONE", then usage report will not be
X printed automatically.  If a new queue name is entered, PRINT
X qualifiers (such as /SETUP=name, /FORM=name, /DELETE, etc.) can
X follow the file name (as in "WH12X_TAL800 /SETUP=S814L).
X
X$ rpt_dest = "TMP$:"
X$ If F$Trnlnm( rpt_dest - ":") .eqs. "" Then rpt_dest = "SYS$MANAGER:"
X$ Inquire   ans`009"POOL_USAGE.RPT location [D=''rpt_dest']"
X$ If ans .nes. "" Then rpt_dest = ans
X$ qsf = "SYS$PRINT"
X$ Inquire   ans`009"PRINT queue name and qualifiers [D=''qsf']"
X$ If ans .nes. "" Then qsf = ans
X$ If qsf .eqs. "/NONE" Then qsf = ""`009!Do not PRINT file
X$!
X$! If no input file specified, then make one ourselves using SYSMAN for
X$! all the nodes in the cluster.
X$!
X$ If p1 .nes. "" Then $ GoTo ProcessFile
X$ Write Sys$Output  " Please be patient, running SHOW MEMORY on all nodes."
X$ Run Sys$system:SysMan
XSet Environment /Cluster
XDo /Output=Sys$Scratch:Show-Memory  Show Memory /Full /All
XExit
X$ p1 = "Sys$Scratch:Show-Memory.Lis"
X$ keep_input = "FALSE"
X$ProcessFile:
X$ p1 = F$Parse( p1, ".LIS;0")`009`009!File defaults
X$ Write Sys$Output  " Reading SHOW MEMORY logs from file ",p1
X$!
X$! Setup symbols with text strings used to parse SHOW MEMORY output
X$!`032
X$ parse_node = "%SYSMAN-I-OUTPUT, command execution on node"
X$ len_node = F$Length(parse_node)
X$ parse_endpage = "Of the physical pages in use"
X$ len_endpage = F$Length(parse_endpage)
X$ parse_srp = "Small Packet (SRP)"
X$ len_srp = F$Length(parse_srp)
X$ parse_irp = "I/O Request Packet (IRP)"
X$ len_irp = F$Length(parse_irp)
X$ parse_lrp = "Large Packet (LRP)"
X$ len_lrp = F$Length(parse_lrp)
X$ parse_npage = "Nonpaged Dynamic Memory"
X$ len_npage = F$Length(parse_npage)
X$ parse_paged = "Paged Dynamic Memory"
X$ len_paged = F$Length(parse_paged)
X$!
X$ num_nodes = 0
X$ On Error Then $ GoTo Pass1Done
X$ Open /Read`009IO_SHOMEM`009'p1'
X$ Open /Write`009IO_REPORT`009SYS$SCRATCH:REPORT.TMP
X$Pass1Loop:
X$   Read /End_Of_File=Pass1Done`009IO_SHOMEM   line
X$   case_goto = "Pass1Loop"
X$   If F$Extract(0,len_node,line) .eqs. parse_node
X$   Then
X$`009node = F$Edit(line - parse_node, "Collapse")
X$   EndIf
X$   If F$Extract(2,len_srp,line) .eqs. parse_srp Then -
X`009case_goto = "ParseLookasideLists"
X$   If F$Extract(2,len_irp,line) .eqs. parse_irp Then -
X`009case_goto = "ParseLookasideLists"
X$   If F$Extract(2,len_lrp,line) .eqs. parse_lrp Then -
X`009case_goto = "ParseLookasideLists"
X$   If F$Extract(2,len_npage,line) .eqs. parse_npage Then -
X`009case_goto = "ParseNPAGEDYN"
X$   If F$Extract(2,len_paged,line) .eqs. parse_paged Then -
X`009case_goto = "ParsePAGEDYN"
X$   If F$Extract(2,len_endpage,line) .eqs. parse_endpage Then -
X`009case_goto = "ReportLine"
X$   GoTo 'case_goto'
X$Pass1Done:
X$ If F$Trnlnm( "IO_SHOMEM") .nes. "" Then $ Close   IO_SHOMEM
X$ If F$Trnlnm( "IO_REPORT") .nes. "" Then $ Close   IO_REPORT
X$ On Error Then $ GoTo ExitHere
X$ If .NOT. keep_input Then $ Delete 'p1'
X$ Write Sys$Output  " Processed SHOW MEMORY logs for ",num_nodes," nodes."
X$!
X$! Alphabetize by node name, add headings and print
X$!
V$ SORT /KEY=(POSITION:1,SIZE:6)`009SYS$SCRATCH:REPORT.TMP`009SYS$SCRATCH:REPO
XRT.TMP
X$!
X$ Open /WRITE`009IO_FINALRPT 'rpt_dest'POOL_USAGE.RPT
X$ cluster = F$Trnlnm( "SYS$CLUSTER_NODE") - "::"
X$ line = F$Fao( "!_Pool usage report for !AS nodes on !%D!/", cluster, 0)
X$ Write`009IO_FINALRPT   line
X$ line = F$Fao( "!6*     !18AS `124 !18AS `124 !18AS `124 !30AS `124 !20AS",-
X`009`009`009   "   SRPCOUNT", "   IRPCOUNT", "   LRPCOUNT",-
X`009`009`009   "        NPAGEDYN", "     PAGEDYN")
X$ Write IO_FINALRPT   line
V$ line = F$Fao( "!6*     !3(6AS) `124 !3(6AS) `124 !3(6AS) `124 !3(10AS) `124
X !2(10AS)",-
X`009`009`009   " Init"," Curr"," Free",-
X`009`009`009   " Init"," Curr"," Free",-
X`009`009`009   " Init"," Curr"," Free",-
X`009`009`009   "   Init","   Curr","   Free",-
X`009`009`009   "   Curr","   Free")
X$ Write IO_FINALRPT   line
X$ s9 = F$Fao( " !9*-")
V$ line = F$Fao( "!6*     !3(6AS) `124 !3(6AS) `124 !3(6AS) `124 !3(10AS) `124
X !2(10AS)",-
X`009`009`009   " -----"," -----"," -----",-
X`009`009`009   " -----"," -----"," -----",-
X`009`009`009   " -----"," -----"," -----",-
X`009`009`009   s9, s9, s9, s9, s9)
X$ Write IO_FINALRPT   line
X$!
X$ n = 0`009`009`009`009!# of lines
X$ Open /Read`009IO_PARTIAL  SYS$SCRATCH:REPORT.TMP
X$Pass2Loop:
X$   Read /End_Of_File=Pass2Done`009IO_PARTIAL  line
X$   n = n + 1
X$   Write IO_FINALRPT  line
X$   modulo = n - 5*(n/5)
X$   If modulo .ne. 0 Then $ GoTo Pass2Loop
X$   line = F$Fao( "!130*-")
X$   Write IO_FINALRPT  line
X$   GoTo Pass2Loop
X$Pass2Done:
X$ Close`009IO_PARTIAL
X$ Close`009IO_FINALRPT
X$!
X$ If qsf .nes. "" Then $ PRINT /QUEUE='qsf'`009'rpt_dest'POOL_USAGE.RPT
X$ExitHere:
X$ DELETE SYS$SCRATCH:REPORT.TMP;*
X$ EXIT`009
X$!
X$! CASE code for use above...
X$!
X$ParseLookasideLists:
X$ lalname = F$Element(0,")",F$Element(1,"(",line))  !Lookaside List name
X$ Read /End_Of_File=Pass1Done`009IO_SHOMEM   line    !Current Total Size
X$ line = F$Edit( line - "Current Total Size", "Compress,Trim")
X$ 'lalname'_now = F$Integer(F$Element(0," ",line))
X$ Read /End_Of_File=Pass1Done`009IO_SHOMEM   line    !Initial Size
X$ line = F$Edit( line - "Initial Size (''lalname'COUNT)", "Compress,Trim")
X$ 'lalname'_init = F$Integer(F$Element(0," ",line))
X$ Read /End_Of_File=Pass1Done`009IO_SHOMEM   line    !Maximum Size - ignored
X$ Read /End_Of_File=Pass1Done`009IO_SHOMEM   line    !Free Space
X$ line = F$Edit( line - "Free Space", "Compress,Trim")
X$ 'lalname'_free = F$Integer(F$Element(0," ",line))
X$ Goto Pass1Loop
X$!*********
X$ParseNPAGEDYN:
X$ Read /End_Of_File=Pass1Done`009IO_SHOMEM   line    !Current Total Size
X$ line = F$Edit( line - "Current Size (bytes)", "Compress,Trim")
X$ npage_now = F$Integer(F$Element(0," ",line))
X$ Read /End_Of_File=Pass1Done`009IO_SHOMEM   line    !Initial Size
X$ line = F$Edit( line - "Initial Size (NPAGEDYN)", "Compress,Trim")
X$ npage_init = F$Integer(F$Element(0," ",line))
X$ Read /End_Of_File=Pass1Done`009IO_SHOMEM   line    !Maximum Size - ignored
X$ Read /End_Of_File=Pass1Done`009IO_SHOMEM   line    !Free Space
X$ line = F$Edit( line - "Free Space (bytes)", "Compress,Trim")
X$ npage_free = F$Integer(F$Element(0," ",line))
X$ Goto Pass1Loop
X$!*********
X$ParsePAGEDYN:
X$ Read /End_Of_File=Pass1Done`009IO_SHOMEM   line    !Current Total Size
X$ line = F$Edit( line - "Current Size (PAGEDYN)", "Compress,Trim")
X$ page_now = F$Integer(F$Element(0," ",line))
X$ Read /End_Of_File=Pass1Done`009IO_SHOMEM   line    !Free Space
X$ line = F$Edit( line - "Free Space (bytes)", "Compress,Trim")
X$ page_free = F$Integer(F$Element(0," ",line))
X$ Goto Pass1Loop
X$!*********
X$ReportLine:
V$ line = F$Fao( "!6AS    !3(6UL) `124 !3(6UL) `124 !3(6UL) `124 !3(10UL) `124
X !2(10UL)",-
X`009`009`009   node, -
X`009`009`009   srp_init, srp_now, srp_free, -
X`009`009`009   irp_init, irp_now, irp_free, -
X`009`009`009   lrp_init, lrp_now, lrp_free, -
X`009`009`009   npage_init, npage_now, npage_free, -
X`009`009`009   page_now, page_free)
X$ Write IO_REPORT   line
X$ num_nodes = num_nodes + 1
X$ Goto Pass1Loop
V$!===========================================================================
X==
X$!+ POOL_USAGE_REPORT
X$! This procedure prepares and prints a memory pool usage report for all
X$! nodes in the cluster (at the time this is run).  The purpose is to guide
X$! modifications to MODPARAMS.DAT files for new AUTOGEN runs.
X$!
X$!`009@RDCS$MGR_UTIL:POOL_USAGE_REPORT  [show-memory-file]
X$!
X$! The parameter, if given is the output from using SYSMAN to do a SHOW
X$! MEMORY on each node of the cluster, as in:
X$!
X$!`009$ RUN SYS$SYSTEM:SYSMAN
X$!`009SET ENVIRONMENT /CLUSTER
X$!`009DO /OUTPUT=TMP$:MEMORY-ALLNODES   SHOW MEMORY /ALL /FULL
X$!`009EXIT
X$!
X$! If the parameter is not given, it will be prompted for.  If a file is
X$! still not specified, it will be created by the procedure using a command
X$! as above.  The file specification defaults applied against the parameter
X$! are ".LIS;0".
X$!
X$! The file is processed (the %SYSMAN-I-OUTPUT lines give the node names)
X$! and a single page report is prepared and printed.  The report will also
X$! be left as file PAGE_USAGE.RPT.
X$!-
V$!===========================================================================
X==
X$! Modifications:
X$!  14-Jun-89`009FJN`009Created
X$!  22-Jun-89`009FJN`009Make generic (remove stuff specific to RDCS nodes)
X$!  26-Jun-89`009FJN`009Finish genericizing work
X$!  27-Jun-89`009FJN`009Ask questions before doing time-consuming work
$ GOSUB UNPACK_FILE
$ EXIT


