Channel Archiver Oct 2000 Kay-Uwe Kasemir, LANL. Channel Archiver Generic archiving system for EPICS Stores independent “Channels” = any Process Variable.

Slides:



Advertisements
Similar presentations
Managed by UT-Battelle for the Department of Energy Best Ever Archive Utility, Yet (BEAUtY) Kay Kasemir April 2013.
Advertisements

Control System Studio (CSS)
1 1999/Ph 514: Channel Access Concepts EPICS Channel Access Concepts Bob Dalesio LANL.
Browsers and Servers CGI Processing Model ( Common Gateway Interface ) © Norman White, 2013.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Check Disk. Disk Defragmenter Using Disk Defragmenter Effectively Run Disk Defragmenter when the computer will receive the least usage. Educate users.
The EPICS Channel Archiver Timothy Graber The Center for Advanced Radiation Sources The University of Chicago EPICS "Getting Started" Lecture Series August.
Distributed storage for structured data
NDT Tools Tutorial: How-To setup your own NDT server Rich Carlson Summer 04 Joint Tech July 19, 2004.
DØ Channel Archiver Tutorial V.Sirotenko, 4/4/2001.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Bertrand Bellenot root.cern.ch ROOT I/O in JavaScript Reading ROOT files from any web browser ROOT Users Workshop
Managed by UT-Battelle for the Department of Energy Best Ever Archive Utility, Yet Creating a BEAST was easy. BEAUtY seems harder. April.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Channel Archiver Stats & Problems Kay Kasemir, Greg Lawson, Jeff Patton Presented by Xiaosong Geng (ORNL/SNS) March 2008.
Channel Archiver Introduction 2006
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
From the ChannelArchiver to the Best Ever Archive Utility, Yet July 2009.
Channel Access Archiver EPICS Meeting May 2002 Berlin Thomas Birke Toolkit Structure Toolkit Components I/O Library ArchiveEngineArchiveManager ArchiveExport.
History Server & API Christopher Larrieu Jefferson Laboratory.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Channel Archive Library Kay-Uwe Kasemir, LANL. Channel Archiver  Directory File + Data Files  Fast disk-based Hash-table lookup  All files interlinked.
Module 10: Monitoring ISA Server Overview Monitoring Overview Configuring Alerts Configuring Session Monitoring Configuring Logging Configuring.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
National Center for Supercomputing Applications NCSA OPIE Presentation November 2000.
Update on a New EPICS Archiver Kay Kasemir and Leo R. Dalesio 09/27/99.
‘ActiveX’ CA Server (… and Client) Oct Kay-Uwe Kasemir, LANL.
Making LabVIEW look like an IOC Kay-Uwe Kasemir, LANL May 2002.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Oct EPICS Meeting, PAL, Korea Control System Studio Training.
Jan Hatje, DESY CSS ITER March 2009: Technology and Interfaces XFEL The European X-Ray Laser Project X-Ray Free-Electron Laser 1 CSS – Control.
The CSS Scan System Kay-Uwe Kasemir SNS/ORNL Dec
Website Development with PHP and MySQL Saving Data.
Stanford Linear Accelerator Center R. D. Hall1 EPICS Collaboration Mtg Oct , 2007 Oracle Archiver Past Experience Lessons Learned for Future EPICS.
ILDG Middleware Status Chip Watson ILDG-6 Workshop May 12, 2005.
1 Channel Access Concepts – EPICS Training – K.Furukawa – Mar EPICS Channel Access Concepts Kazuro Furukawa, KEK, ( ) (Bob Dalesio, LANL,
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Jan Control System Studio, CSS Overview.
March 2008EPICS Meeting in Shanghai1 KEKB Control System Status Mar Tatsuro NAKAMURA KEKB Control Group, KEK.
3.14 Work List IOC Core Channel Access. Changes to IOC Core Online add/delete of record instances Tool to support online add/delete OS independent layer.
Spring 2003 EPICS Collaboration Controls Group CZAR 2.0 (in development) Christopher A. Larrieu Chris Slominski.
1 EPICS Bus Errors & Power PC u VME Bus Error can generate a Machine Check Exception (MCE) u The WRS mv2700 BSP doesn’t have code to do this u Write cycles.
Guide to Linux Installation and Administration, 2e1 Chapter 11 Using Advanced Administration Techniques.
Copyright © 2012 UNICOM Systems, Inc. Confidential Information z/Ware Product Overview illustro Systems International A Division of UNICOM Global.
Writing a Channel Access Client in EPICS Bob Dalesio, April 5, 2000.
Writing a Channel Access Client in EPICS Bob Dalesio, April 5, 2000.
Controls Group Archiving at Jefferson Lab (Presentation of work by Chris Larrieu)
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays - done for rsrv in 3.14 Channel access priorities - planned to.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
1 MSRBot Web Crawler Dennis Fetterly Microsoft Research Silicon Valley Lab © Microsoft Corporation.
1 KEKB Archiving Dec Tatsuro KEK.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays Channel access priorities Portable server replacement of rsrv.
Online Monitoring System at KLOE Alessandra Doria INFN - Napoli for the KLOE collaboration CHEP 2000 Padova, 7-11 February 2000 NAPOLI.
Applications Kay Kasemir ORNL/SNS Using Information and pictures from Matthias Clausen, Jan Hatje, and Helge Rickens (DESY) October 2007.
1 Channel Access Concepts – IHEP EPICS Training – K.F – Aug EPICS Channel Access Concepts Kazuro Furukawa, KEK (Bob Dalesio, LANL)
Channel Archiver Overview Jan Channel Archiver Channel Access client Stores samples in disk files Design target: handle values/sec Documentation,
Staging Archived Data at DESY December 2008.
Data Aging - Euthanasia Bob Dalesio. Data Management - Channel Data Allow recovery of unused data space Allow selective delete of channels Allow selective.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
WebScan: Implementing QueryServer 2.0 Karl Geiger, Amgen Inc. BRS NA UG August 1999.
Implementation and Testing of RDB Channel Archiver with MySQL Richard Ma, DePauw University Supervisor: Richard Farnsworth, Argonne National Laboratory.
Monitoring Dynamic IOC Installations Using the alive Record Dohn Arms Beamline Controls & Data Acquisition Group Advanced Photon Source.
WWW and HTTP King Fahd University of Petroleum & Minerals
z/Ware 2.0 Technical Overview
Chapter 27 WWW and HTTP.
Channel Archiver Kay-Uwe Kasemir, LANL
Channel Access Concepts
Channel Access Concepts
Presentation transcript:

Channel Archiver Oct 2000 Kay-Uwe Kasemir, LANL

Channel Archiver Generic archiving system for EPICS Stores independent “Channels” = any Process Variable served by Channel Access Sampling options a) periodically b) on change

Goals Fast: –Hash-table channel lookup, binary data format with direct access to recent values. Generic and Portable: –Win32, Linux, Solaris, HPUX,… –Data archived: EPICS dbr_time_*, providing system-independent access to float, int, string, enum, … with time & status, units, limits, … Networked: –Remote access to both Engine status/configuration and archived data Extendable: –I/O library meant to be extended to make Engine, CGI Tool etc. work with different storage formats Attractive for both casual users and “experts” –Web interface, Win32 archive viewer for generic access to raw samples –scripting support (SWIG) for automated analysis, creation of input for other programs

Components Engine: Taking data from ChannelAccess CGIExport: Web access to data ChannelArchive ScriptingInterface: SWIG access for more sophisticated analysis WinBrowser: Win32 tool for fast archive browsing Archive I/O library: portable archive I/O, extendable for different file formats

Workstation CA Server CA Interactions Network Viewer I/O Lib Engine I/O Lib CA Scripting I/O Lib Web Browser (data) HTTP Web Browser (Engine cfg.) Web Server I/O Lib CGIExport HTTP HTTPD IOC EPICS Db CA

Engine Networked via HTTP Up to values/sec (450Mhz PC) WIN32, Linux, Solaris

Engine: Start USAGE: ArchiveEngine [Options] [ ] Options: -port WWW server's TCP port (default 4812) -description description for HTTP display -log write logfile Default directory-file: 'freq_directory' Engine is ChannelAccess client: may have to set EPICS_CA_ADDR_LIST, EPICS_CA_SERVER_PORT TCP port has to be unique per machine Log-file: copy of messages/warnings

Engine: Configuration ASCII File: # Comments !default_period 30 !group –For building disabling groups, otherwise like an #include in C/C++ [Monitor] [Disable] –Scan period is also important for “Monitor” channels: It determines size of buffer. If more samples arrive than anticipated, “overwrites” occur. Example: #Archive channels of example CA server (excas) fred Monitor freddy Monitor jane 5 janet 10

Engine: Groups “disabling” channel !=0  group disabled: Main: # Main archive file !default_period 30 !write_period 60 !group power_supply !group another_subsystem power_supply: # Power Supply: # Archive only when power is on! power_off Monitor Disable power_setpoint power_readback power_temperature

Engine: More Options !write_period Time between writes to disk !get_threshold Internally, CA ‘get’ is used for channels scanned at period > threshold, remaining channels are ‘monitored’ !buffer_reserve Engine keeps memory buffer per channel to buffer between writes to disk. Size:buffer_reserve * write_period/scan_period Since writes can be delayed by other tasks, disk activity etc., buffer is usually bigger than the minimum required (default: 3). If receiving "override" messages, one should –Check if the offending channel is tagged Monitor. In that case the period estimate might be too large. –Increase buffer_reserve (global for all channels)

Engine: Status URL of engine’s HTTPD: : “Client Pull”: Updates on reload Changes (added groups/channels) written to cfg subdirectory, original config. files unchanged

Engine: Sampling Original time stamps of CA Server / IOC preserved, not adjusted/rounded to period! Example: “1.0 sec”  every sec., last value is saved

WIN32 Browser Familiar User Interface Win. Only

XARR, StripTool (Chris Larrieu, JLab) View/Export Tools for UNIX (X11/Motif) XARR: access to archive via older lib. Plan: Support LibIO for both

CGIExport For any Web Browser, any Web Server w/ CGI Archive Info Simple Plots (GNUPlot) Export in Spreadsheet format Web Server I/O Lib CGIExport HTTP

CGIExport: Plots

CGIExport: Spreadsheet 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)

CGIExport: “Fill”, “Interpol.”,...

Scripting Interface Not optimal for “end users”, but allows programmers to –provide adjustable scripts: Time/Y Plot, X/Y Plot, List,... –automatically generate e.g. daily statistics for Web –write filters for Matlab, Mathematica, … –answer questions like: “How often was XX below 10.0 and for how long?”

CASI: Channel Archive Scripting Interface SWIG - based: –allows access from tcl, perl, python –available for Win32 and Unix –Available Examples: tcl/tk and python –for Win32 and Linux: loadable module API: –Plain adaption of ChannelArchive LibIO

Generic Examples

Channel Archiver LibIO Portable C++ code (handling e.g. byte swapping) Based on generic “Iterator” interface: –Archive: list channels –ChannelIterator/Channel: first/last time available, find value before/after/near time –ValueIterator/Value: get time, status, value both as string and “raw” Supported: BinArchive, MultiArchive

LibIO: Example #define ARCHIVE_TYPE BinArchive void list_values (const stdString &archive_name, const stdString &channel_name, const osiTime &start, const osiTime &end) { Archive archive (new ARCHIVE_TYPE (archive_name)); ChannelIterator channel(archive); ValueIterator value(archive); if (! archive.findChannelByName (channel_name, channel)) return; channel->getValueAfterTime (start, value); while (value && value->getTime() < end) { cout << *value << endl; ++ value; }

BinArchive File Layout Directory File Disk-based Hash Table Channel “X” start time end time first data buffer last data buffer Channel “Y” start time end time first data buffer last data buffer Data File 1 Control Info units, limits,... Data Buffer (X) buffer info: start/end, type, … prev buffer, next buffer { Samples } Control Info units, limits,... Data Buffer (Y) buffer info: start/end, type, … prev buffer, next buffer { Samples } Data Buffer (Y) buffer info: start/end, type, … prev buffer, next buffer { Samples } Data File 2 Control Info units, limits,... Data Buffer (X) buffer info: start/end, type, … prev buffer, next buffer { Samples } Control Info units, limits,... Data Buffer (Y) buffer info: start/end, type, … prev buffer, next buffer { Samples }

BinArchive Features Hash Table +fastest lookup by name –less suited for sorted listing or wildcard lookup Binary Data File, Multiple Channels per File +minimized open/close calls, fastest read/write access –byte swapping required, harder to maintain Double-Linked Data Blocks +fastest access to most recent values –links must not be broken

ArchiveManager Program Extraction of channels and time range into new archive –attempt is made to skip/repair “broken” values while copying Channels/time ranges can be appended to existing archive –no “insert” nor “prepend”! Possible Approach: –Create extracts of reasonable size for backup (e.g. monthly CD-ROM) –Original archive can be recreated from extracts, starting with the oldest one, not going back in time 1999 (copy) 1999 (orig.) Jan.’99 Feb.’99 Mar.’99 Dec.’99...

MultiArchive Allows read-access to list of archives –compile-time option for CGIExport, Tcl extension, WinBrowser –first archive that holds requested data is used –when iteration meets end of data, archive list is searched again –no sophisticated merging, i.e. archives should not overlap in time –for now each individual archive has to be a BinArchive Format: # ChannelArchiver master file master_version=1 # Order in which archives are checked for data: /archives/fast/dir /archives/main/SinceJan2000/freq_directory /archives/main/Jul99-Dec99/freq_directory /archives/main/Jan99-Jun99/freq_directory /home/fred/xyzarchive/dir

More Information “ChannelArchiver” under Documentation is part of sources: ChannelArchiver/doc Bob Dalesio: Kay-Uwe Kasemir: