masar service guobao shen photon sciences department brookhaven national laboratory epics...
TRANSCRIPT
![Page 1: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/1.jpg)
MASAR Service
Guobao Shen
Photon Sciences Department
Brookhaven National Laboratory
EPICS Collaboration Workshop
Oct 05, 2013
![Page 2: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/2.jpg)
Outline
What’s MASAR & architecture MASAR server MASAR client Experience at NSLS II
2
![Page 3: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/3.jpg)
Infrastructure
Architecture
3
Ethernet
Distributed Front-Ends
CAS PVAS
Diag dbCAS PVAS
PS db
CAS PVAS
RF dbPhysical Device Physical Device Physical Device
CAS PVAS
VA dbPhysical Device
CAS
JMS ServiceTracy-III Simulation
MySQL/IRMIS
PVAS
HTTP/REST
Lattice/Model
Python
MySQL
PVAS
HTTP/REST
Channel Finder
Java
MySQL/IRMIS
PVAS
HTTP/REST
MUNICONV
Python
SQLite/IRMIS
pvAccess/channelRPC
MASAR
Python
Python Apps
CAC PVAC REST
MMLT
CAC PVAC REST
Matlab Apps
CAC PVAC REST
Channel Arch
CAC PVAC REST
CSS
pvManager
CAC PVAC REST
![Page 4: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/4.jpg)
What’s MASAR?
MASAR Machine Snapshot, Archiving, and Retrieve An EPICS tool for experimental control system
Machine A facility controlled by EPICS, accelerator for example
Snapshot Data at specific time point
Value, time stamp, connection status, alarm status, alarm severity
Similar tools, but different purpose IOC automatic save & restore
IOC bumpless rebooting Channel Archiving
Archive pre-defined configuration periodicallyAll data saved time serially
4
![Page 5: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/5.jpg)
What’s MASAR?
MASAR Glance
5
![Page 6: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/6.jpg)
MASAR Architecture
6
Service EngineService Engine
pvAccess/channelRPCpvAccess/channelRPC
PyQtPyQt
Channel Access
Gather/C++Gather/C++
Low Level Python Client Library pvAccess/channelRPC Client (C++)Low Level Python Client Library
pvAccess/channelRPC Client (C++)
pvAccess
DSL-PY ModuleDSL-PY Module
PYMASAR (SQLite)
PYMASAR (SQLite)
ScriptingScripting
IOCIOCIOCIOC IOCIOC
ScriptingScripting
High Level Scripting APIHigh Level Scripting API CSS/BOYCSS/BOY
pvAccess Client API Library (Java)
pvAccess Client API Library (Java)
Finished User Apps Planning Developing
Others(Matlab)Others
(Matlab)
![Page 7: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/7.jpg)
MASAR Server
Snapshot taken with pre-configuration RDB to store configuration and snapshot data
SQLite PYMASAY to access SQLite
API in PythonIsolate RDB and service engineSchema change transparentRDB pluggable
DSL-PY to manage data in Python & C++ domain Service engine
Analyze & response client commands Implement in EPICS V4/C++ Use pvAccess/channelRPC for communication
7
![Page 8: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/8.jpg)
MASAR Server
Snapshot configuration
8
pv group configuration event
...
event datapv
Snapshot
![Page 9: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/9.jpg)
MASAR Server Snapshot configuration
EPICS PV orientatedSupport all scalar and waveform PV types
Float, double, string, and enum PV group
Collection of PV namesCan be a mix of any of the types
One PV can be in many PV groups Configuration
Collection of PV groups, therefore, collection of PV namesOne PV group can be in many configurations
Snapshot An event happened at a particular time Belongs to one configuration
One configuration can have many events Each event is one data set
Header information + meta data (value, time stamp)
![Page 10: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/10.jpg)
MASAR Client/UI
API for scripting environment 7 APIs in Python
PyQt UI Based on
above APIs Browse config Browse event Take snapshot Retrieve data Compare data Restore machine Export data
10
![Page 11: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/11.jpg)
MASAR Client/UI
Data plot for waveform PV Saved data and live data of one waveform PV in one graph
11
![Page 12: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/12.jpg)
MASAR Client/UI
Multiple data sets comparison Support up to 9 data sets
12
![Page 13: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/13.jpg)
Experience at NSLS II
13
Deployed in control network from the first day (3/27/2012) Configuration increasing with time
![Page 14: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/14.jpg)
Experience at NSLS II
14
Snapshots taken with time
![Page 15: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/15.jpg)
Experience at NSLS II
15
Snapshots taken with time Events (by 2013-09-19 11:18:48)total taken: 369, approved: 108
![Page 16: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/16.jpg)
Experience at NSLS II
16
Database size growing over time
![Page 17: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/17.jpg)
Plan
Tools for pv group/configuration management Display all PV& PV group(s) of a configuration Compare existing configuration Create a new configuration
RDB data management Performance concerns saving large configuration
Lots of PVsLarge data size of PV
Migrate to a dedicate RDB server Separate meta data out of SQLite
PyQt UI continuous improvement CSS integration for client ChannelFinder integration for configuration
17
![Page 18: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/18.jpg)
Backup
18
![Page 19: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/19.jpg)
Experience at NSLS II
Question offten asked Why timing mode was often changed? Why BPM calibration offset went back to 0? We just calibrated it
recently, and it should not be changed after it was determined. Why all quadrupoles’ setting are 0 when I try to restore a snapshot? I want to take one snapshot of configure A, and right after 1 second,
take another snapshot of configure B. Then combine those 2 data set to compare them. Does MASAR support this requirement?
Why the file size growing with time since the total pv are same?
19
![Page 20: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/20.jpg)
Experience at NSLS II
Lesson learned Design each configuration carefully
Collect requirement from user: physicist/operatorAsk sub-system control experts to review it before creating a
configuration Separate operator configuration and sub-system export
configurationNot all pvs need to be restoredObvious, but not everyone is aware of it
20
![Page 21: MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013](https://reader030.vdocuments.net/reader030/viewer/2022032805/56649ee55503460f94bf5757/html5/thumbnails/21.jpg)
Experience at NSLS II
Lesson learned MASAR provides restore function inside the PyQt GUI
Check snapshot before restoringRestoring machine to the status MASAR recordedNot the status in mind
For that particular question, with Olog, we confirmed that snapshot was taken during machine shutdown.
MASAR is aiming to snapshot the data. User is encouraged to develop their own application to use the
dataCheck the timestamp of both event and pvs when using the data
Timestamp of event is when the snapshot was takenTimestamp of pv is when the pv was processed
It is the SQLite database file size, not each snapshot.All snapshots are saved into one database
21