MPE/iX - CI Programming for Stability

July 18, 2008 HP World '01 49
Powerfail script
UPS configuration file, UPSCNFIG.PUB.SYS):
Contents:
powerfail_message_routing
= all_terminals
powerfail_low_battery
= keep_running
powerfail_command_file = prodshut.opsys.sys
powerfail_grace_period = 300
PRODSHUT.OPSYS.SYS script example:
warn @; Powerfail detected by UPS. Orderly shutdown BEGIN
warn @; ***** Please logoff immediately! *****
if jobcnt(prod1J,usr.acct, jobID) > 0 then
stream hipriJ
pause 60; job=!hplastjob
abortjob !jobID
endif
errclear
pause 180; job=@s
if cierror = 9032 then
warn @;System going down in 2 minutes!
pause 120
endif
shutdown