HP recommends that you create a batch-oriented command procedure
to automatically run AUTOGEN on a regular basis and send the resulting
feedback reports to an appropriate Mail account.
Sample AUTOGEN Command Procedure provides a sample command procedure.
This command procedure runs AUTOGEN only to recommend
system parameter values and send you a report. It does not run AUTOGEN
to change system parameters or reboot the system. If, after reviewing
the report, you decide to change system parameters, follow the instructions
in
Changing Parameter Values After Reviewing AUTOGEN Reports.
The command procedure in
Sample AUTOGEN Command Procedure runs two passes of AUTOGEN. On the first pass, AUTOGEN
runs during peak workload times to collect data on realistic system
work loads. This pass does not degrade system performance. On the
second pass, AUTOGEN runs during off-peak hours to interpret the
data collected in the first stage.
The procedure sends the resulting report, contained in the
file AGEN$PARAMS.REPORT, to the SYSTEM account. Review this report
on a regular basis to see whether the load on the system has changed.
Sample AUTOGEN Command Procedure shows a sample
command procedure. Use this procedure only as an example; create
a similar command procedure as necessary to meet the needs of your
configuration.
Example 2 Sample AUTOGEN Command Procedure
$ BEGIN$: ! ++++++++++ AGEN_BATCH.COM ++++++++++
$ on warning then goto error$
$ on control_y then goto error$
$!
$! Setup process
$!
$! Set process information
$ set process/priv=all/name="AUTOGEN Batch"$! Keep log files to a reasonable amount
$ purge/keep=5 AGEN_Batch.log
$ time = f$time() ! Fetch current time
$ hour = f$integer(f$cvtime(time,,"hour") ) ! Get hour
$ today = f$cvtime(time,,"WEEKDAY") ! Get Day of the week
$ if f$integer(f$cvtime(time,,"minute") ) .ge. 30 then hour = hour + 1
$!
$! Start of working day...
$!
$ 1AM$:
$ if hour .le. 2
$ then
$ next_time = "today+0-14"$ gosub submit$ ! Resubmit yourself
$ set noon
$!
$! Run AUTOGEN to TESTFILES using the parameter values collected earlier
$! in the day (i.e., yesterday at 2:00pm)
$ if today .eqs. "Tuesday" .OR. today .eqs. "Thursday" .OR. -
today .eqs. "Saturday"$ then
$ @sys$update:autogen GETDATA TESTFILES feedback [2]
$ mail/sub="AUTOGEN Feedback Report for system-name" -
sys$system:agen$params.report system [3]
$ ! Clean up
$ purge/keep=7 sys$system:agen$feedback.report [4]
$ purge/keep=7 sys$system:agen$feedback.dat
$ purge/keep=7 sys$system:params.dat
$ purge/keep=7 sys$system:autogen.par
$ purge/keep=7 sys$system:setparams.dat
$ purge/keep=7 sys$system:agen$addhistory.tmp
$ purge/keep=7 sys$system:agen$addhistory.dat
$ endif
$ goto end$
$ endif
$!
$ 2PM$:
$ if hour .le. 15
$ then
$ next_time = "today+0-17"$ gosub submit$
$ if today .eqs. "Monday" .OR. today .eqs. "Wednesday" .OR. -
today .eqs. "Friday"$ then
$ @sys$update:autogen SAVPARAMS SAVPARAMS feedback [1]
$ endif
$ goto end$
$ endif
$!
$ 5PM$:
$ if hour .le. 18
$ then
$ next_time = "tomorrow+0-1"$ gosub submit$
$ endif
$!
$! End of working day...
$!
$ END$: ! ---------- BATCH.COM ----------
$ exit
$!++
$! Subroutines
$!--
$!
$ SUBMIT$:
$ submit/name="AGEN_Batch"/restart/noprint - [5]
/log=AGEN_batch.log -
/queue=sys$batch/after="''next_time'" sys$system:AGEN_batch.com
$ return
$!++
$! Error handler
$!--
$ ERROR$:
$ mail/sub="AGEN_BATCH.COM - Procedure failed." _nl: system
$ goto end$
The commands in this procedure perform the following tasks:
Executes the first pass of AUTOGEN
during peak workload times to collect data on realistic work loads. This
command runs a very fast image so it does not degrade system response.
Executes the second pass of AUTOGEN during off-peak
hours to interpret the data collected in the first pass.
Mails the resulting report file named AGEN$PARAMS.REPORT
to the SYSTEM account.
Cleans up the files created.
Resubmits the command procedure.
Changing Parameter Values After Reviewing
AUTOGEN Reports
If the command procedure report described in
Automating AUTOGEN Reports shows AUTOGEN's calculations
are different from the current values, correct the tuning by executing
AUTOGEN with one of the two following commands:
If the system can be shut down and
rebooted immediately, execute the following command:
$ @SYS$UPDATE:AUTOGEN GETDATA REBOOT FEEDBACK
If the system cannot be shut down and rebooted immediately,
execute the following command to reset the system parameters:
$ @SYS$UPDATE:AUTOGEN GETDATA SETPARAMS FEEDBACK
The new parameters will take effect the next time the system
boots.