Carl Lionberger, 11 Sept, 1996 (CALionberger@lbl.gov)
Bumpless Restart is a facility for initializing EPICS process variable fields to the values they had shortly before the IOC was rebooted. The fields to be so treated are specified in the description fields of the PV's. At startup these field specifications are read and saved to a file on the unix boot host. In addition, if a file of saved values exists on the host, it is read in and used to initialize the PV's. A task is started which monitors the specified fields and updates the save file periodically if necessary.
The facility uses Save/Restore Routines written by Bob Dalesio (contained in files mentioned in the Installation section).
Assuming Bumpless Restart has already been installed on your system, you need
to specify the base file name for the save files in the IOC startup script, and
specify the field names in the ".DESC" fields of your PV's. You
may also specify the interval at which the save file is updated.
The save file name is specified by a line of the form:
bumpless_fname = "filename"where filename is the name you want for the base name of your save files. This line must appear before the iocInit command. After booting, the list of fields to be saved will be in the file "
filename",
and the saved values in "filename.sav".
The period specification is optional; if it is left out, it defaults to saving once per minute. The period is in seconds and once per second is the highest allowed rate. NOTE: It is strongly recommened that you use NFS mounted files for cases with high save rates require. To establish the once per second update rate, the following line would be inserted in the startup script:
bumpless_period = 1Finally, the facility must be initialized by placing, before the iocInit command:
bumplessInitThe field specifications are embedded in the
.DESC field of the
EPICS records, where you insert them with whatever database configuration tool
you use. An escape string is used to indicate the beginning of the field
specifier list; this may be changed at installation time; the default is
"[[". After the escape string the following rules are in force:
VAL
field is saved and restored.
?" character matches any
character, and character classes in square brackets are supported.
Thus, "?OPR" would match HOPR and
LOPR, as would "[HL]OPR". The
pattern "[A-E]" would match the A, B, C, D, and E fields of a
calc record. Simple strings such as "VAL" can also be used.
Characters must be upper case. Invalid field names are disregarded silently.
user (u) : vxuser
in combination with the NFS authorization
nfsAuthUnixSet "host",uid,gid
has write-permission in the specified or implied directory.
save_restore.c", "save_restore.h",
and "static_sr.c".
"save_restore.c" has routines written for the channel access
library, while "static_sr.c" has routines written for the
static database library;
conflicts in the header files necessitate separate modules. These
files can be installed in "base/src/db", or in a separate
"support application" area.
As an example, a loadable "Lib" called "saveRestoreLib" can be
built by adding the following to the appropriate "Makefile.Vx":
SRCS.c += ../save_restore.c ../static_sr.c
SROBJS = save_restore.o static_sr.o
PROD += saveRestoreLib
saveRestoreLib: $(SROBJS)
@echo Building library $@
$(RM) $@
$(LINK.c) $@ $^
You must also incrementally load both the "initHooks.o"
supplied with EPICS base and the above:
ld < bin/target/initHooks.o
ld < bin/target/saveRestoreLib
run_bumpless() could be modified to generate the
save list information rather than getting it from a file generated by
bldslist(). This would require a special version of
create_monitor_set() for the bumpless application.
bumpless_fname" and
"bumpless_period" should be EPICS environment strings.