Channel Archiver Overview Jan. 2003
Channel Archiver Channel Access client Stores samples in disk files Design target: handle values/sec Documentation, Snapshots: LANL EPICS Page. From see Other Sites, LANL, Tools, Archiver.
Operation Config. file lists channels to archive # Example: channel_X 1 channel_Y 10 # Monitor: might change every 0.2 second channel_Z 0.2 Monitor Scanned Periodically store most recent value Monitor Store all incoming values – up to buffer limit Original time stamps are stored!
1s Period 9.96, 10.98, s ?
Components CA Data Directory Storage Retrieval LibIO (C++) ArchiveEngine LibIO (C++) WinBrowser (Win32) LibIO (C++) xarr (Unix) LibIO (C++) StripTool (Unix) LibIO (C++) CGIExport WebServer Native: LibIO (C++) SWIG TCL tk,BLT LibIO (C++) SWIG Python tk,BLT,PMW LibIO (C++) SWIG Perl CGI,DBI,DBD Scripting: Online: (also possible via scripting) LibIO (C++) Archive- Export LibIO (C++) Archive- Manager
ArchiveEngine Syntax: ArchiveEngine [options] config [dir] Options: -d -p : change HTTPD from l : write log file
Engine’s HTTPD URL of engine’s HTTPD: : Status & Config., not data! “Client Pull”: Updates on reload Changes (added groups/channels) written to cfg subdirectory, original config. files unchanged
“Directory File” File name, not a directory name Specified when running archive engine Default: “freq_directory”. Better: “dir”. Used by retrieval tools Details of “directory” and “data” files are given in documentation Note: Keep directory & data files together, don’t modify them.
ArchiveExport Syntax: ArchiveExport [options] [dir] {channel names} Options: -start “mm/dd/yyyy hh:mm:ss” -end “mm/dd/yyyy hh:mm:ss” -fill -interpolate -gnuplot -Matlab …
Export Options Original Time Stamps: ill-suited for Spreadsheets “Fill” missing values by repetition Linear Interpolation for given period (initial #N/A until all channels have valid value)
“Fill”, “Interpol.”,...
MATLAB Export Tools generate MATLAB command file ASCII, portable No MATLAB binaries required Full value info, time & status Big & slow
WinBrowser Win. Only
CGI Export Data Access from any Web browser Download formats: Spreadsheet, Matlab Data Web Server CGIExport WWW
CGI Export Online Plots
Scripting Allows writing perl/tcl/python programs for Automated generation of daily beam statistics for Web page Specialized scripts to answer questions like: “How often was XX below 10.0 and for how long?” …
ArchiveEngine Details More options, see manual: !write_period “Groups” for getting organized conditional archiving !group Disable
Retrieval f. Multiple Archives Run several ArchiveEngines, creating several “small enough” data sets Look at them all at once: master_version=1 # List sub-archives, most recent first /archives/2001/july/dir /archives/2001/june/dir /archives/2001/may/dir # … # Then check Fred's "xyz" archive /home/fred/xyzarchive/dir Sub-archives should not “overlap”
Suggested Setup Long Term Archive Sample ~10min, kept forever Middle Term Sample every 60s, restarted after 15 days, switching between two directories Short Term Up to ‘Monitor’, toggling two directories every shift High-grained data for last shift, good data for last 2 weeks, some log of everything kept forever
CAManager (Thomas Birke, BESSY) ArchiveEngine control GUI Start/Stop Status of (multiple) ArchiveEngines Periodic re-start in different directory, updating a MultiArchive File
Data Management Do not separate Directory & Data files! Periodically restart Engine in new directory to keep data sets manageable (CAManager helps) ArchiveManager program can copy selected channels & time range, performing basic repairs and compression while doing this
Summary “ChannelArchiver” is a Toolset for archiving any ChannelAccess data Some generic retrieval options, scripting and Matlab allow further analysis Future Plans: Port to R3.14 and RH8 CORBA interface for data retrieval (common w/ JLab archiver, replace tcl/perl/python binding, allow Java access to data)