Paul Scherrer Institute Switzerland Stefan Ritt The ELOG

  • Slides: 21
Download presentation
Paul Scherrer Institute, Switzerland Stefan Ritt The ELOG electronic logbook EPICS Meeting, Oct. 22,

Paul Scherrer Institute, Switzerland Stefan Ritt The ELOG electronic logbook EPICS Meeting, Oct. 22, 2020

A bit of history • MIDAS DAQ system developed in 1996 • Originally for

A bit of history • MIDAS DAQ system developed in 1996 • Originally for PIBETA experiment @ PSI • First system with web interface • Need for electronic logbook • Searchable • Easy to copy/distribute • Remote access • Birth of ELOG • First was integral part of MIDAS system • Standalone version in 2001 • 88 Releases 1. 0. 0 – 3. 1. 4 (current) (elog/doc/Change. Log) MIDAS Version 1. 8. 3, released August 8, 2001 ---------------------- Stefan Ritt Fixed problems occurring under Red Hat 7. 1 modified mserver. c to run under xinetd put xinetd configuration info into INSTALL file added /Custom tree in ODB for mhttpd to display user-specific pages standalone elogd program included for offline logbook display added mail notification in elog in mhttpd EPICS Meeting, Oct. 22, 2020 2/21

Basic principles of ELOG • Web access Reachable from any computer with Web Browser

Basic principles of ELOG • Web access Reachable from any computer with Web Browser • Monolithic C(++) program • • • Faster than interpreted languages Needs less memory, runs nicely on Raspberry PI Does not depend on Web servers No dependency of external libraries (except SSL and Kerberos) Simple to compile and install • • Recent extensions in Java. Script • “Designed by user” Only contains features that are needed • (Most) needed features are contained • • Configurable Can be electronic logbook, discussion forum, bug tracker, … • Huge number of configuration options • Some will be covered in this talk • Stefan Ritt EPICS Meeting, Oct. 22, 2020 3/21

ELOG Database • Simple text database • • • Relational databases (my. SQL) were

ELOG Database • Simple text database • • • Relational databases (my. SQL) were not available or were “heavy” back in 2001 Database cannot get corrupt Database can be edited with ASCII editor (by “experts”) Many people use scripting tools to analyze or modify ELOG databases directly Attachments as files • Data storage with one file per day YYMMDDa. log Can make easy backups $ cp 14? ? a. log /backup • One subdirectory per year • 2013/13*a. log 2014/14*a. log … $@MID@$: 1 Date: Thu Nov 08 18: 37: 57 2001 Author: Stefan Ritt Type: Routine Category: General Subject: Welcome Attachment: Encoding: ELCode ==================== [B]Congratulations for installing ELOG sucessfully! [/B] This is a demo entry to ensure the elogd server is working correctly. Click [I]"New"[/I] to add new pages and [I]"Delete"[/I] to delete this page. Stefan Ritt EPICS Meeting, Oct. 22, 2020 4/21

Different “faces” Stefan Ritt EPICS Meeting, Oct. 22, 2020 5/21

Different “faces” Stefan Ritt EPICS Meeting, Oct. 22, 2020 5/21

Configuration Concepts • Configuration via single text file, editable through web browser • Total

Configuration Concepts • Configuration via single text file, editable through web browser • Total of 149 settings and 41 flags • Documented on one huge page: http: //elog. psi. ch/elog/config. html Server options valid for all logbooks Logbook Attributes Flag Stefan Ritt [global] port = 8080 [demo] Theme = default Comment = General Linux Tips & Tricks Attributes = Author, Type, Category, Subject Options Type = Routine, Problem Fixed, Configuration, Other Options Category = General, Hardware, Software, Network, Other Required Attributes = Author, Type Quick filter = Date, Type Reverse sort = 1. . . EPICS Meeting, Oct. 22, 2020 6/21

Attributes • Attributes are values common to all entries in a logbook, like “columns”

Attributes • Attributes are values common to all entries in a logbook, like “columns” in a relational database • Defined via Attributes = Author, Type, Category • Stored in header of text files • Attribute sets are extendable $@MID@$: 1 Date: Thu Nov 08 18: 37: 57 2001 Author: Stefan Ritt Type: Routine Category: General Subject: Welcome Attachment: Encoding: ELCode ==================== [B]Congratulations for installing ELOG sucessfully! [/B] This is a demo entry to ensure the elogd server is working correctly. Click [I]"New"[/I] to add new pages and [I]"Delete"[/I] to delete this page. Stefan Ritt EPICS Meeting, Oct. 22, 2020 7/21

Conditional attributes • Settings can depend on the value of an attribute Attributes =

Conditional attributes • Settings can depend on the value of an attribute Attributes = PC Name, Operating System, Version Options Operating System = Linux{1}, Windows{2} {1} Options Version = 2. 2, 2. 4, 2. 6 {2} Options Version = NT, XP, W 7, W 8 • Hide certain attributes on condition, different tooltips, logical or of conditions, … Stefan Ritt EPICS Meeting, Oct. 22, 2020 8/21

Flags • Enable/Disable almost all features • Default presets for most dialog boxes •

Flags • Enable/Disable almost all features • Default presets for most dialog boxes • Select language (17 languages available) Stefan Ritt EPICS Meeting, Oct. 22, 2020 9/21

Email notifications • Email notifications for certain processes • • Stefan Ritt New entry,

Email notifications • Email notifications for certain processes • • Stefan Ritt New entry, modified entry Email to registered user(s) or external email addresses Attributes have certain values (like new entry with system=DAQ & category=Error) Email can contain summary, full entry, with/without attachments EPICS Meeting, Oct. 22, 2020 10/21

Access control • User accounts with central password database (XML) and optional guest access

Access control • User accounts with central password database (XML) and optional guest access • Auto-logout, self register [with/without admin approval] • Kerberos & LDAP & PAM support <? xml version="1. 0" encoding="ISO-8859 -1"? > <!-- created by MXML on Wed Dec 17 14: 52: 42 2014 --> <list> <user> <name>stefan</name> <password encoding="SHA 256">Gbn. Pp. Ebx 9 t. FFQ/i. UW 3 m. U 8 Cmi/a. JXVwdm. Vk 74 j. Ft 56 C</password> <full_name>Stefan Ritt</full_name> <email>stefan. ritt@psi. ch</email> <last_logout>Thu Oct 23 09: 37: 45 2014</last_logout> <last_activity>Thu Oct 23 11: 43: 28 2014</last_activity> <email_notify> <logbook>Online</logbook> <logbook>DAQ</logbook> </email_notify> </user> </list> Stefan Ritt EPICS Meeting, Oct. 22, 2020 11/21

Themes CSS = <file. css> /* default formatting */ body { margin: 3 px;

Themes CSS = <file. css> /* default formatting */ body { margin: 3 px; color: black; background-color: white; font-family: verdana, tahoma, sans-serif; /* background-image: url(elog. gif); */ } /* standard link colors and decorations */ a: link { color: #0000 FF; text-decoration: none } a: visited { color: #800080; text-decoration: none } a: hover { color: #0000 FF; text-decoration: underline } a: active { color: #0000 FF; text-decoration: underline } a: focus { color: #0000 FF; text-decoration: underline } td { color: black; font-size: 12 px; } Stefan Ritt EPICS Meeting, Oct. 22, 2020 12/21

Mirroring • Keep two or more logbooks in sync • Synchronization works both ways

Mirroring • Keep two or more logbooks in sync • Synchronization works both ways • Implementation using MD 5 hash values Logbook 1 Logbook 2 ID 3 MD 5 ID 2 MD 5 ID 1 MD 5 ID 4 MD 5 ID 3 MD 5 ID 2’ MD 5 ID 1 MD 5 Stefan Ritt Mirror server = <URL-list> Mirror config = 0 | 1 Mirror cron = 0 3 * * * // every night at 3: 00 EPICS Meeting, Oct. 22, 2020 13/21

“elog” utility • Command line utility to commit ELOG entries • Scriptable “cat text

“elog” utility • Command line utility to commit ELOG entries • Scriptable “cat text | elog –h … -l …” • Automatic entries e. g. accelerator status (used at PSI) elog -h <hostname> [-p port] -l logbook -s [-v] [-w password] [-u username password] [-f <attachment>] -a <attribute>=<value> [-r <id>] [-q] [-e <id>] [-x] [-n 0|1|2] -m <textfile>] | <text> Stefan Ritt Host name of elog server Port number, default 80 Name of logbook Use SSL for communication For verbose output Write password defined on server User name and password Up to 50 attachments Up to 50 attributes Reply to existing message Quote original text on reply Edit existing message Suppress email notification Encoding: 0: ELcode, 1: plain, 2: HTML Entry body EPICS Meeting, Oct. 22, 2020 14/21

Shift Checklist • Completely custom HTML hand crafted forms as input forms for logbooks

Shift Checklist • Completely custom HTML hand crafted forms as input forms for logbooks • Perfect for shift checks with tablet computers https: //elog. psi. ch/elogs/Forum/66909 Stefan Ritt EPICS Meeting, Oct. 22, 2020 15/21

Check list table Stefan Ritt EPICS Meeting, Oct. 22, 2020 16/21

Check list table Stefan Ritt EPICS Meeting, Oct. 22, 2020 16/21

Search engine in Browser • Most browsers allow definition of custom search engines •

Search engine in Browser • Most browsers allow definition of custom search engines • Define ELOG as a search engine with custom search string https: //elog. psi. ch/elogs/Forum/? subtext=%s Stefan Ritt EPICS Meeting, Oct. 22, 2020 17/21

CKEditor • Editor allows Rich Editing, Drag & Drop of images and smartphone photo

CKEditor • Editor allows Rich Editing, Drag & Drop of images and smartphone photo upload Stefan Ritt EPICS Meeting, Oct. 22, 2020 18/21

Installation • https: //elog. psi. ch/elog/download. html • Public GIT repository “make” / “cmake”

Installation • https: //elog. psi. ch/elog/download. html • Public GIT repository “make” / “cmake” “sudo make install” “sudo /etc/init. d/elogd start” “launchctl” under OSX • • Source code TAR ball Windows Binaries Linux Binaries (RPM) Debian Package Stefan Ritt EPICS Meeting, Oct. 22, 2020 19/21

Personal experience with ELOG • Based on usage since 2001 at PSI for many

Personal experience with ELOG • Based on usage since 2001 at PSI for many experiments and at our accelerator control room • User Interface and code a bit ”antique”, but simple, robust, reliable and debugged (after 20 years…) • “monit” tool to restart crashed server (couple of times per year on public server) • In spite of vast usage (~10 labs, all LHC experiments) I get only very few issues (~1 / month) • Logbook size fine to ~few 100’ 000 entries, search can get slow Stefan Ritt EPICS Meeting, Oct. 22, 2020 20/21

In case of questions … https: //elog. psi. ch/elog/ Stefan Ritt EPICS Meeting, Oct.

In case of questions … https: //elog. psi. ch/elog/ Stefan Ritt EPICS Meeting, Oct. 22, 2020 21/21