User Tools

Site Tools


parsec_autogen.com_and_a_sample_execution

This is an old revision of the document!


Information

The following document is a more user friendly method of using AUTOGEN.COM and being able to easily visualize the proposed changes. 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:

$! My_autogen.com $! $! This procedure executesautogen.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 Def ault” $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

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 getdata setparams %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
GBLSECTIONS                    1620       1570        -50       1024
MAXPROCESSCNT                   997        797       -200         32
SYSMWCNT                      14918      13516      -1402       8192
NPAGEDYN                   28966912   27525120   -1441792    4194304
NPAGEVIR                  149430272  149422080      -8192   16777216
PAGEDYN                    12722176   11534336   -1187840    4194304
MPW_LOLIMIT                    2985       2385       -600        256
LOCKIDTBL                      3840       3636       -204       3840
RESHASHTBL                     4096      16384      12288         64
LOCKDIRWT                         1          0         -1          0
MSCP_SERVE_ALL                    4          2         -2          4
STARTUP_P2                      PDC        VDC
GH_EXEC_CODE                   4352       4096       -256       4096
GH_RES_CODE                    6570       5376      -1194       5120
GH_RES_DATA                     512        384       -128        512
BALSETCNT                       995        795       -200         30
GBLPAGES                   25579391   25654822      75431     131072
MPW_THRESH                     5970       4770      -1200         16
LGI_BRK_DISUSER                   1          0         -1          0
PQL_DWSDEFAULT                68918      77278       8360      32768
PQL_MWSDEFAULT                68918      77278       8360      16384
PQL_DWSQUOTA                 137836     154556      16720      65536
ACP_QUOCACHE                    997        797       -200         64
ACP_SYSACC                       29         23         -6          8
PIXSCAN                          80         79         -1          1
**End-of-File** | PREV/NEXT=Scroll, INS/REM=Pan, SELECT=80/132, Q=Quit
Do you wish to keep these changes [Y]?
parsec_autogen.com_and_a_sample_execution.1631829315.txt.gz · Last modified: 2021/09/16 21:55 by mmacgregor

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki