Introduction talk - Midas

Report
Paul Scherrer Institute, Switzerland
Stefan Ritt
The electronic logbook ELOG and its utilization
for accelerator operations
KIT Seminar, Jan. 30th, 2015
Agenda
• Part 1
• Quick demo
• Design principles of ELOG
• Advanced features: Automatic
entries, Checklists, Mirroring
• Part 2
• ELOG @ PSI for accelerator
operation
Stefan Ritt
KIT Seminar, Jan. 30th, 2015
2/23
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
• 83 Releases 1.0.0 – 3.0.0 (current)
(elog/doc/ChangeLog)
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
KIT Seminar, Jan. 30th, 2015
3/23
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 JavaScript
• “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 seminar
Stefan Ritt
KIT Seminar, Jan. 30th, 2015
4/23
ELOG Database
• Simple text database
•
•
•
•
•
Relational databases (mySQL) 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
Attachments as files
• Data storage with one file per day YYMMDDa.log
•
•
Can make easy backups $ cp 14????a.log /backup
Recent change with one
[email protected]@$: 1
Date: Thu Nov 08 18:37:57 2001
Author: Stefan Ritt
subdirectory per year
Type: Routine
2013/13*a.log
2014/14*a.log
…
Stefan Ritt
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.
KIT Seminar, Jan. 30th, 2015
5/23
Different “faces”
Stefan Ritt
KIT Seminar, Jan. 30th, 2015
6/23
Configuration Concepts
• Configuration via single text file, editable through web browser
• Total of 149 settings and 41 flags
• Documented on one huge page:
http://midas.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
. . .
KIT Seminar, Jan. 30th, 2015
7/23
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
[email protected]@$: 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
KIT Seminar, Jan. 30th, 2015
8/23
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, W7, W8
• Hide certain attributes on condition, different tooltips,
logical or of conditions, …
• “Merge” different logbooks into one
Stefan Ritt
KIT Seminar, Jan. 30th, 2015
9/23
Flags
• Enable/Disable almost all features
• Default presets for most dialog boxes
• Select language (17 languages available)
Stefan Ritt
KIT Seminar, Jan. 30th, 2015
10/23
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
KIT Seminar, Jan. 30th, 2015
11/23
Access control
• Simple access control via read & write passwords
(obsolete)
• User accounts with central password database (XML)
and optional guest access
• Auto-logout, self register [with admin approval]
• Kerberos & LDAP 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="SHA256">GbnPpEbx9tFFQ/iUW3mU8Cmi/a.JXVwdmVk74jFt56C</password>
<full_name>Stefan Ritt</full_name>
<email>[email protected]</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
KIT Seminar, Jan. 30th, 2015
12/23
Themes
CSS = <file.css>
/* default formatting */
body {
margin:3px;
color:black;
background-color:white;
font-family:verdana,tahoma,sans-serif;
/* background-image:url(elog.gif); */
}
/* standard link colors and decorations */
a:link { color:#0000FF; text-decoration:none }
a:visited { color:#800080; text-decoration:none }
a:hover { color:#0000FF; text-decoration:underline }
a:active { color:#0000FF; text-decoration:underline }
a:focus { color:#0000FF; text-decoration:underline }
td {
color:black;
font-size:12px;
}
Stefan Ritt
KIT Seminar, Jan. 30th, 2015
13/23
Mirroring
• Keep two or more logbooks in sync
• Synchronization works both ways
• Implementation using MD5 hash values
Logbook 1
Logbook 2
ID 3
MD5
ID 3
MD5
ID 2
MD5
ID 2
MD5
ID 1
MD5
ID 1
MD5
ID 4
MD5
ID 3
MD5
ID 3
MD5
ID 2
MD5
ID 2’
MD5
ID 1
MD5
ID 1
MD5
ID 4
MD5
ID 4
MD5
ID 3
MD5
ID 3
MD5
ID 2’
MD5
ID 2’
MD5
ID 1
MD5
ID 1
MD5
Stefan Ritt
Mirror server = <URL-list>
Mirror config = 0 | 1
Mirror cron = 0 3 * * * // every night at 3:00
KIT Seminar, Jan. 30th, 2015
14/23
“elog” utility
• Command line utility to commit ELOG entries
• Scriptable “cat text | elog –h … -l …”
• Automatic entries e.g. accelerator status → next talk
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
KIT Seminar, Jan. 30th, 2015
15/23
Shift Checklist
• Completely custom HTML hand crafted forms as input
forms for logbooks
• Perfect for shift checks with tablet computers
https://midas.psi.ch/elogs/Forum/66909
Stefan Ritt
KIT Seminar, Jan. 30th, 2015
16/23
Check list table
Stefan Ritt
KIT Seminar, Jan. 30th, 2015
17/23
Search engine in Browser
• Most browsers allow definition of custom search engines
• Define ELOG as a search engine with custom search string
http://midas.psi.ch/elogs/Forum/?subtext=%s
Stefan Ritt
KIT Seminar, Jan. 30th, 2015
18/23
CKEditor
• Recent extension (Dario Milicic) allows Rich Editing,
Drag & Drop of images and smartphone photo upload
Stefan Ritt
KIT Seminar, Jan. 30th, 2015
19/23
Installation
• http://midas.psi.ch/elog/download.html
• Public GIT repository
“make”
“sudo make install”
“sudo /etc/init.d/elogd start”
“launchctl” under OSX
•
•
•
•
•
•
•
•
Source code TAR ball
Windows Binaries
Linux Binaries (RPS)
Debian Package
Stefan Ritt
KIT Seminar, Jan. 30th, 2015
20/23
Personal experience with ELOG
• Use since 2001 for three large experiments with ~30
logbooks
• Reliable, easy to use
• “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 ~few issues per month
• Logbook size fine to ~few 100’000 entries, search can
get slow
Stefan Ritt
KIT Seminar, Jan. 30th, 2015
21/23
In case of questions …
Stefan Ritt
KIT Seminar, Jan. 30th, 2015
22/23
ELOG for accelerator operation
How to match existing functionality to accelerator
operation needs?
Calculated
Fields
Actions
Bookmarks
Forms
Conditional
Formatting
Mirror
Servers
Email
Structured
Information
Kerberos
Access
Rules
Stefan Ritt
Export
elog
Command
→ Andreas Lüdeke
KIT Seminar, Jan. 30th, 2015
CSS
Logbook
Groups
23/23

similar documents