LCLS How-to use Autosave and catPuLogManual
IntroductionThe LCLS project will need a facility for bumpless reboots as well as a facility for logging channel access puts to the IOC errorLog facility. Bumpless RebootsAutosave automatically saves the values of EPICS process variables (PVs) to files on a server, and restores those values when the IOC is rebooted. Autosave is a two-part operation: run-time save, and boot-time restore. The run-time part (save_restore.c) is started by commands in the IOC startup file, and persists while the IOC is running. Its primary job is to save PV values to files on a server, but it also supports manual restore and other management operations. The boot-time part (dbrestore.c) is invoked during iocInit, via an EPICS initHook. It restores PV values from files written by the run-time part, and does not persist after iocInit() returns. In addition to the autosave software, the autosave module contains a client program, asVerify, to compare written autosave files with current PV values. This program can also write an autosave file from which PV values can be restored. Channel Access Put LoggingCaPutLog is an EPICS support module that provides logging for Channel Access put operations. The current version works with EPICS 3.14.8.2 and later and is almost a complete re-write of the original (3.13 compatible) version that was written by V. Korobov (DESY). It is based on the generic iocLogClient that is part of the EPICS libCom. Starting a log server requires exactly the same steps as for the regular iocLogServer, except that you probably want to use a different port. On the IOC side there are three routines to be called from the iocShell. See the How to below. 1. Add the following line to the $(TOP)/configure/RELEASE AUTOSAVE = <top directory of the autosave support module> The following version has been built for use with EPICS base tag: base-R3-14-8-2-lcls2 2. Add the following two lines to the xxxApp/src/Makefile xxx_DBD += autosaveSupport.dbd The first of the two adds device support to the xxx.dbd file, the second 3. Add this line to the xxxApp/Db/Makefile DB_INSTALLS += $(AUTOSAVE)/db/save_restoreStatus.db
At this point you should be able to build the IOC without errors. 4. Add the following lines to the $(TOP)/iocBoot/iocxxx/st.cmd save_restoreSet_status_prefix( "XYZ") The following 2 lines are optional
set_savefile_path( "/data","autosave")
set_requestfile_path( "iocBoot/iocxxx")
set_pass0_restoreFile( "<file0>.sav")
set_pass1_restoreFile( "<file1>.sav")
epicsThreadSleep(1.0) create_monitor_set( "<file0>.req",30,"P=<prefix>") additional monitor and/or other sets can be created as needed. NOTE: that <prefix> is the value to be used in the request files to construct NOTE: for details on all autosave function calls as well as the format of the 5. The autosave files are written to NFS mounted file system. If this needs to
6. An info node, in an EPICS database, is similar to a field specification, but it has the word info instead of field; and it has an arbitrary name, instead of the name of a field in the record. Here's an EPICS database containing a single record with two info nodes: record(ao, "$(P)test1") { From this information, makeAutosaveFiles() will write the following two files: info_settings.req info_positions.req CAPUTLOG_MODULE_VERSION=Development For EPICS BASE: base-R3-14-8-2-lcls2 |