User Tools

Site Tools


parsec_autogen.com_and_a_sample_execution

Table of Contents

Information

The following document is a more user friendly method of using AUTOGEN.COM. It will show you the original display that AUTOGEN generates, but also provide a table of information containing the parameters that are being recommended for change, the old value of the parameter, the new proposed value of the parameter, the difference between those values, and the default value of the procedure.

Errors may occur during the copy/paste of this document, so test it in a safe place before using it in production.

Procedure

Create a command procedure with the following information:

$! parsec_autogen.com
$!
$! This procedure executes autogen.com and displays the report to the user
$! Along with a list of changed parameters
$! If the system has been up 14 days or more, it will save feedback information
$! And use it, otherwise it will use previously saved feedback information.
$!
$! Check privs
$!
$ privs_needed = "sysprv,cmkrnl,oper"
$ svprv = f$setprv (privs_needed)
$ cur_prv = f$privilege(privs_needed)
$ if cur_prv .eqs. "FALSE"
$ then
$    write sys$output "You have insufficient privileges for this procedure."
$    exit
$ else
$    write sys$output "You have sufficient privileges to continue."
$ endif
$!
$! Block CNTL-Y
$!
$ type sys$input


      The CTRL-Y is being blocked in this procedure. Please be patient
      and wait for the "Do you wish to keep these changes [Y]?" question
      and answer no.

      This is being done to prevent accidental changes of the system
      parameters that will affect the next reboot when you intended
      to exit the procedure.


$ set nocontrol=y
$
$ define /user_mode sys$output sys$scratch:params.inf_old
$ mcr sysgen
  use active
  show/all
  show/special
  use current
  write sys$scratch:vmssys.parsec
$!
$ call uptime
$ if uptime_days .ge. 14
$    then start = "savparams"
$    else start = "getdata"
$    endif
$ if p1 .nes. "" then start = p1
$ if start .nes. "NONE"
$ then
$       if p2 .eqs. "" then p2 = "setparams"
$       write sys$output "@sys$update:autogen ''start' ''p2' ''p3'"
$       svprv = f$setprv ("sysprv,cmkrnl")
$       @sys$update:autogen 'start' 'p2' 'p3'
$       svprv = f$setprv (svprv)
$ endif
$!
$ define /user_mode sys$output sys$scratch:params.inf_new
$ mcr sysgen
  use current
  show/all
  show/special
$!
$ close /nolog in1
$ close /nolog in2
$ close /nolog out
$ open /read in1 sys$scratch:params.inf_new
$ open /read in2 sys$scratch:params.inf_old
$ open /write out sys$scratch:params.inf_dif
$ write out "Parameter name               Old value  New value Difference    Default"
$next_diff:
$ read in1 /end=done_diff rec1
$ read in2 rec2
$ if rec1 .eqs. rec2 then goto next_diff
$ if f$extract (2, 9, rec1) .eqs. "Parameter" then goto next_diff
$ rec1 = f$edit (rec1, "trim")
$ pname = f$element (0, " ", rec1)
$ if pname .eqs. "internal" then goto next_diff
$ mode = f$extract (f$length(rec1)-5, 5, rec1)
$ if mode .eqs. "Ascii"
$ then
$       pnew = f$edit (f$element (1, """", rec1), "trim")
$       pnew = f$extract (f$length(pnew), 10, "          " + pnew)
$       pdef = f$edit (f$element (3, """", rec1), "trim")
$       pdef = f$extract (f$length(pdef), 10, "          " + pdef)
$       pold = f$edit (f$element (1, """", rec2), "trim")
$       pold = f$extract (f$length(pold), 10, "          " + pold)
$       write out f$fao ("!24AS !10AS !10AS            !10AS", pname, pold, pnew, pdef)
$ else
$       rec1 = f$edit (rec1, "compress")
$       pnew = f$integer (f$element (1, " ", rec1))
$       pdef = f$interer (f$element (2, " ", rec1))
$       rec2 = f$edit (rec2, "trim,compress")
$       pold = f$integer (f$element (1, " ", rec2))
$       diff = f$fao ("!10SL", f$integer(pnew) - f$integer(pold))
$       write out f$fao ("!24AS !10UL !10UL !AS !10UL", pname, pold, pnew, diff,pdef)
$ endif
$ goto next_diff
$done_diff:
$ close in1
$ close in2
$ delete sys$scratch:params.inf_new;*
$ delete sys$scratch:params.inf_old;*
$ close out
$ if start .nes. "NONE" then -
  read sys$command recl/prompt="Press <RETURN> to review reports "
$ type /page=save sys$scratch:params.inf_dif,sys$system:agen$params.report
$ if start .nes. "NONE"
$ then
$       read sys$command recl/prompt="Do you wish to keep these changes [Y]? "
$       if recl .nes. "" .and. .not. recl
$       then
$               mcr sysgen
  use sys$scratch:vmssys.parsec
  write current
$       endif
$ endif
$ delete sys$scratch:params.inf_dif;*,sys$scratch:vmssys.parsec;*
$ exit
$!
$! Support routine
$uptime:
$ subroutine
$! UPTIME.COM
$!
$! This procedure gets system current uptime from a SHOW SYSTEM command
$! And stores the value in some global symbols.
$!
$ show system /output=uptime.dat
$ open /read /share=read inf uptime.dat
$!OpenVMS V6.2-1H3  on node PARIS   4-FEB-1999 10:11:36:.03  Uptime  10 18:48:48
$ read inf upt
$ close inf
$ delete /nolog uptime.dat;*
$ x = f$locate ("Uptime", upt)
$ upt = f$extract (x+7, 9999, upt)
$ uptime == f$edit (upt, "trim,compress")
$ uptime_days == f$integer (f$element (0, " ", uptime))
$ x = f$element (0, ":", uptime)
$ uptime_hours == uptime_days * 24 + f$integer (f$element (1, " ", x))
$ if p1 .nes. "" then -
write sys$output "''f$getsyi("nodename")' has been up ''uptime'"
$ exit
$ endsubroutine

Sample Run

This is a sample run of the procedure:

$ @parsec_autogen
You have sufficient privileges to continue.


      The CTRL-Y is being blocked in this procedure. Please be patient
      and wait for the "Do you wish to keep these changes [Y]?" question
      and answer no.

      This is being done to prevent accidental changes of the system
      parameters that will affect the next reboot when you intended
      to exit the procedure.


@sys$update:autogen savparams setparams
%AUTOGEN-I-BEGIN, SAVPARAMS phase is beginning.
%AUTOGEN-I-FEEDBACK, Gathering feedback
%AUTOGEN-I-NEWFILE, A new version of SYS$SYSTEM:AGEN$FEEDBACK.DAT
        has been created. You may wish to purge this file.
%AUTOGEN-I-END, SAVPARAMS phase has successfully completed.
%AUTOGEN-I-BEGIN, GETDATA phase is beginning.
%AUTOGEN-I-NEWFILE, A new version of SYS$SYSTEM:PARAMS.DAT has been created.
        You may wish to purge this file.
%AUTOGEN-I-END, GETDATA phase has successfully completed.
%AUTOGEN-I-BEGIN, GENPARAMS phase is beginning.
%AUTOGEN-I-NEWFILE, A new version of SYS$MANAGER:VMSIMAGES.DAT has been created.
        You may wish to purge this file.
%AUTOGEN-I-NEWFILE, A new version of SYS$SYSTEM:SETPARAMS.DAT has been created.
        You may wish to purge this file.
%AUTOGEN-I-END, GENPARAMS phase has successfully completed.
%AUTOGEN-I-BEGIN, GENFILES phase is beginning.

******************
%AUTOGEN-W-REPORT, Warnings were detected by AUTOGEN.  Please review the
        information given in the file SYS$SYSTEM:AGEN$PARAMS.REPORT
******************

%AUTOGEN-I-REPORT, AUTOGEN has produced some informational messages which
        have been stored in the file SYS$SYSTEM:AGEN$PARAMS.REPORT.  You may
        wish to review the information in that file.

%AUTOGEN-I-END, GENFILES phase has successfully completed.
%AUTOGEN-I-BEGIN, SETPARAMS phase is beginning.
%AUTOGEN-I-SYSGEN, parameters modified
%AUTOGEN-I-END, SETPARAMS phase has successfully completed.
Press <RETURN> to review reports

Parameter name               Old value  New value Difference    Default
MAXPROCESSCNT                   185        167        -18         32
PROCSECTCNT                     512        128       -384        128
SYSMWCNT                       8601       8438       -163       8192
NPAGEDYN                   33153024   31498240   -1654784    4194304
NPAGEVIR                  173146112  166166528   -6979584   16777216
PAGEDYN                     7340032    7200768    -139264    4194304
CHANNELCNT                     2560        512      -2048        512
MPW_LOLIMIT                     549        495        -54        256
LOCKIDTBL                     19918      17051      -2867       3840
RESHASHTBL                    16384      32768      16384         64
LNMSHASHTBL                     512       1024        512        512
BALSETCNT                       183        165        -18         30
GBLPAGES                    4324845    4305741     -19104     131072
MPW_THRESH                     1098        990       -108         16
ACP_HDRCACHE                   1098        990       -108         36
ACP_QUOCACHE                    185        167        -18         64
PIXSCAN                          18         16         -2          1
 **End-of-File** | PREV/NEXT=Scroll, INS/REM=Pan, SELECT=80/132, Q=Quit


SYS$SYSROOT:[SYSEXE]AGEN$PARAMS.REPORT;107     24 blocks     12-OCT-2021 11:03:0

    Page file calculations:

        PAGEFILE information:
        Feedback information.
           Old value was 4201700, New value is 4201700
           Maximum observed usage: 0
        Override Information - parameter calculation has been overridden.
           The calculated value was 3986700.  The new value is 4201700.
           PAGEFILE calculation has been set to current size by user.
           PAGEFILE will not be modified. The file size is within 10%.

    Swap file calculations:

        SWAPFILE information:
        Feedback information.
           Old value was 100000, New value is 100000
           Maximum observed usage: 0
        Override Information - parameter calculation has been overridden.
           The calculated value was 21400.  The new value is 100000.
           SWAPFILE calculation has been set to current size by user.
           SWAPFILE will not be modified. The file size is within 10%.
Do you wish to keep these changes [Y]?  

NOTE: After the differences are displayed, you will need to hit ENTER to get the original AUTOGEN report. Otherwise the final section will not be displayed.

parsec_autogen.com_and_a_sample_execution.txt · Last modified: 2021/10/12 17:58 by mmacgregor

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki