Channel Archiver Overview Jan 2003 Channel Archiver n

  • Slides: 22
Download presentation
Channel Archiver Overview Jan. 2003

Channel Archiver Overview Jan. 2003

Channel Archiver n n Channel Access client Stores samples in disk files Design target:

Channel Archiver n n Channel Access client Stores samples in disk files Design target: handle 10000 values/sec Documentation, Snapshots: LANL EPICS Page. From http: //www. aps. anl. gov/epics, see Other Sites, LANL, Tools, Archiver.

Operation n Config. file lists channels to archive # Example: <channel> <period [s]> channel_X

Operation n Config. file lists channels to archive # Example: <channel> <period [s]> channel_X 1 channel_Y 10 # Monitor: might change every 0. 2 second channel_Z 0. 2 Monitor n Scanned n n Monitor n n Periodically store most recent value Store all incoming values – up to buffer limit Original time stamps are stored!

1 s Period Data @ 9. 96, 10. 98, 11. 76 s ?

1 s Period Data @ 9. 96, 10. 98, 11. 76 s ?

Components Storage Native: CA Retrieval xarr Win. Browser Strip. Tool Archive. Export (Unix) Lib.

Components Storage Native: CA Retrieval xarr Win. Browser Strip. Tool Archive. Export (Unix) Lib. IO (C++) TCL Archive. Engine Scripting: Lib. IO (C++) Directory Data Archive. Manager Lib. IO (C++) tk, BLT (Win 32) Lib. IO (C++) (Unix) Lib. IO (C++) Python Perl tk, BLT, PMW CGI, DBD SWIG Lib. IO (C++) Online: (also possible via scripting) Web. Server CGIExport Lib. IO (C++)

Archive. Engine n n Syntax: Archive. Engine [options] config [dir] Options: -d <desciption> -p

Archive. Engine n n Syntax: Archive. Engine [options] config [dir] Options: -d <desciption> -p <port> : change HTTPD from 4812 -l <log> : write log file

Engine’s HTTPD n n URL of engine’s HTTPD: http: //<machine>: <port> Status & Config.

Engine’s HTTPD n n URL of engine’s HTTPD: http: //<machine>: <port> Status & Config. , not data! “Client Pull”: Updates on reload Changes (added groups/channels) written to cfg subdirectory, original config. files unchanged

“Directory File” n n File name, not a directory name Specified when running archive

“Directory File” n n File name, not a directory name Specified when running archive engine n n 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.

Archive. Export n n Syntax: Archive. Export [options] [dir] {channel names} Options: -start “mm/dd/yyyy

Archive. Export n n Syntax: Archive. Export [options] [dir] {channel names} Options: -start “mm/dd/yyyy hh: mm: ss” -end “mm/dd/yyyy hh: mm: ss” -fill -interpolate <seconds> -gnuplot -Matlab …

Export Options n n n Original Time Stamps: ill-suited for Spreadsheets “Fill” missing values

Export Options n n n 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. ”, . . .

“Fill”, “Interpol. ”, . . .

MATLAB n Export Tools generate MATLAB command file n n ASCII, portable No MATLAB

MATLAB n Export Tools generate MATLAB command file n n ASCII, portable No MATLAB binaries required Full value info, time & status Big & slow

Win. Browser n Win. Only

Win. Browser n Win. Only

CGI Export WWW Web Server CGIExport Data n n Data Access from any Web

CGI Export WWW Web Server CGIExport Data n n Data Access from any Web browser Download formats: Spreadsheet, Matlab

CGI Export Online Plots

CGI Export Online Plots

Scripting n Allows writing perl/tcl/python programs for n n n Automated generation of daily

Scripting n Allows writing perl/tcl/python programs for n n n 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? ” …

Archive. Engine Details n More options, see manual: !write_period <seconds> n “Groups” for getting

Archive. Engine Details n More options, see manual: !write_period <seconds> n “Groups” for getting organized n conditional archiving !group <other file> <channel> <period> Disable n

Retrieval f. Multiple Archives n n Run several Archive. Engines, creating several “small enough”

Retrieval f. Multiple Archives n n Run several Archive. Engines, 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 n Sub-archives should not “overlap”

Suggested Setup n Long Term Archive n Middle Term n Short Term Sample ~10

Suggested Setup n Long Term Archive n Middle Term n Short Term Sample ~10 min, kept forever Sample every 60 s, restarted after 15 days, switching between two directories 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 n (Thomas Birke, BESSY) Archive. Engine control GUI Status of (multiple) Archive. Engines

CAManager n (Thomas Birke, BESSY) Archive. Engine control GUI Status of (multiple) Archive. Engines Start/Stop Periodic re-start in different directory, updating a Multi. Archive File

Data Management n n n Do not separate Directory & Data files! Periodically restart

Data Management n n n Do not separate Directory & Data files! Periodically restart Engine in new directory to keep data sets manageable (CAManager helps) Archive. Manager program can copy selected channels & time range, performing basic repairs and compression while doing this

Summary n n n “Channel. Archiver” is a Toolset for archiving any Channel. Access

Summary n n n “Channel. Archiver” is a Toolset for archiving any Channel. Access data Some generic retrieval options, scripting and Matlab allow further analysis Future Plans: n n Port to R 3. 14 and RH 8 CORBA interface for data retrieval (common w/ JLab archiver, replace tcl/perl/python binding, allow Java access to data)