EPICS Save/Restore (sr) Upgrade Project

(Channel Watcher)

Problem: The current version of Save/Restore (sr), also known as Bumpless Reboot, may be interfering with normal IOC operations due to the large number of file writes.

Solution: Move the file writes (i.e. Save functions) to a client computer (i.e. UNIX box).  We may even eventually do away with the file altogether and use a database such as Oracle.  Leave the restore functions on the IOC.

Notes from the EPICS Workshop, Dec. 3&4, 2001, Fairmont Hotel, San Jose: Jeff Hill suggests that we design the software with Object Oriented Plug-ins so users can choose which features to include in their local Channel Watcher builds.  Click here for software design notes.

Staged Implementation:

The software upgrade will be developed in the following stages.  Each stage represents a point at which the software will be tested and released.

Stage 1: Simple move to UNIX with enhancements

Channel Watcher Stage 1

Stage 1 Enhancements:

The following tags may be used in CWlog messages:

Tag Value
text text of message like what epicsPrintf provides
facility Channel Watcher
host IOC associated with the channel
device Channel Name
message Channel alias
severity EPICS severity of the channel
status EPICS status of the channel
value Current value of the channel as a string
code See Channel Watcher file CWlogmsgABC.hh for a list of codes

Stage 2: Convert Repositories to caGet/caPut file format and add cmlog message Throttling.

Stage 3: Statistics

Web interface to list channels by

Stage 4: Wildcarding using regular expressions

Add wildcarding of channel names in the Channel Groups and to the Statistics tool listed above using the same Oracle Database we now know and love.  Steph says that there are epics library tools that already know how to resolve regular expressions.

As long as we're doing that Kristi wants the software designed in such a way as to make it easy to make a tool that will list channels given a regular expression.  Make it and call it ChannelLister.

Stage 5: Channel Groups and Repositories in Oracle Database

Channel Watcher Stage 5

Stage 5 Enhancements:


Stage 6: Restore from Oracle Database

Channel Watcher Stage 7

Instead of reading the file Repositories the  IOC could get the channel values directly from the Oracle Database possibly with Aida.  Steph also points out that at this point the Channel Watcher could run on an IOC so make sure the code is generic enough so that it can run on multiple platforms.

Master File Format:

Channel-Group-file-name <white space> Repository_file_name

Master File Notes: 

Channel Group File Format: optional items in italics

# comment

channel:name <white space> /log <white space> /nowrite <white space> # <white space> channel:alias

channel:name <white space> /LOG <white space> /NOWRITE <white space> # <white space> channel:alias

<blank lines>

How to start the Channel Watcher:

The startup procedure and file locations for PEPII and NLC development channel watcher processes are detailed in these SLAC-only links:


Options for starting channel watcher:

-f specifies the Channel Group file name or Master File name required
-s specifies the Repository Name optional, defaults to Channel Group File name .sav
-c specifies the top of the Channel Group location. Overwrites CW_CHANNEL_GROUP_ROOT optional
-r specifies the top of the Repository location.  Overwrites CW_REPOSITORY_ROOT optional, but -r requires -c
-t specifies the minimum time required between Repository generations optional, default to 10 seconds.  Must be >= 10 seconds.
-l specifies the location of any non-Repository file written by Channel Watcher (like a log file) overwrites stderr optional, defaults to stderr
-n specifies the maximum number of cmlog messages to issue in -m seconds before throttling for a channel optional, defaults to 4 messages
-m specifies the minimum time required between cmlog messages for a channel before throttling optional, defaults to 10 seconds
-e specifies ca_pend_event time in seconds optional, defaults to 1, must be less than or equal to -t and -m
-i specifies and identifying tag for log messages.  Useful when running more than one Channel Watcher. optional, defaults to NULL
-h help optional
-p Health Summary PV name optional

Environment variables used by Channel Watcher:



Last Update 10-Oct-2002 by Mike Zelazny zelazny@slac.stanford.edu