/Elog ODB tree

From MidasWiki
Revision as of 17:04, 24 June 2015 by Suz (talk | contribs)
Jump to navigation Jump to search


Links

Creating the /Elog tree

The /Elog tree is created automatically the first time the ELOG button on the mhttpd Status Page is pressed.

Purpose

The ODB /Elog tree contains the information necessary to run the Elog (Electronic Logbook), which is implemented through Mhttpd. By default, the internal elog is created. If an external elog is required, it must be set up to run on a port, and the file elogd.cfg created. See ELOG Administrators Guide.

Location of ELOG Files

By default, elog files are written into the directory path given by the ODB key /Logger/Data dir.

This location can be changed by use of the ODB Key /Logger/Elog dir. This key is optional and doesn't appear by default in the //Logger tree, but can be created by the user if desired. If this key is present, the location of the Internal Electronic logbook (Elog) files is reassigned to the defined path.

If using an External Elog, the location of the files are given by the key


Examples

Example 1

When initially created (see #Creating the /Elog tree#above the /Experiment tree contains the following keys:

[local:midas:S]/>ls -lrt /elog
Key name                        Type    #Val  Size  Last Opn Mode Value
---------------------------------------------------------------------------
Elog                            DIR
   Display run number          BOOL    1     4     17m  0   RWD  y
   Allow delete                BOOL    1     4     17m  0   RWD  n
   Buttons                     STRING  3     32    17m  0   RWD
                                       [0]             8h
                                       [1]             24h
                                       [2]             7d
  

Example 2

Creating a New message (by clicking on the New button on the Elog Page results in the full /Elog tree being created, i.e.

[local:test:S]/>ls -lrt /elog
Key name                        Type    #Val  Size  Last Opn Mode Value
---------------------------------------------------------------------------
Elog                            DIR
   Display run number          BOOL    1     4     13m  0   RWD  y
   Allow delete                BOOL    1     4     13m  0   RWD  n
   Buttons                     STRING  3     32    13m  0   RWD
                                       [0]             8h
                                       [1]             24h
                                       [2]             7d
   Types                       STRING  20    32    9m   0   RWD
                                       [0]             Routine
                                       [1]             Shift summary
                                       [2]             Minor error
                                       [3]             Severe error
                                       [4]             Fix
                                       [5]             Question
                                       [6]             Info
                                       [7]             Modification
                                       [8]             Reply
                                       [9]             Alarm
                                       [10]            Test
                                       [11]            Other
                                       [12]
                                       [13]
                                       [14]
                                       [15]
                                       [16]
                                       [17]
                                       [18]
                                       [19]
   Systems                     STRING  20    32    9m   0   RWD
                                       [0]             General
                                       [1]             DAQ
                                       [2]             Detector
                                       [3]             Electronics
                                       [4]             Target
                                       [5]             Beamline
                                       [6]
                                       [7]
                                       [8]
                                       [9]
                                       [10]
                                       [11]
                                       [12]
                                       [13]
                                       [14]
                                       [15]
                                       [16]
                                       [17]
                                       [18]
                                       [19]
   Host name                   STRING  1     256   9m   0   RWD  dasdevpc2.triumf.ca

Example 3

The user can optionally add keys so that email is sent to users when messages with particular Type or System are created, e.g.

   Email Severe error          STRING  1     32    57s  0   RWD  midas@triumf.ca
   Email DAQ                   STRING  1     32    28s  0   RWD  abe.triumf.ca, cal@triumf.ca
   SMTP host                   STRING  1     32    53m  0   RWD  localhost

Example 4

If running an External elog, the following keys will be added

   Url                         STRING  1     64    >99d 0   RWD  http://isdaq60.triumf.ca:8089/BNMRonline/
   Logbook Dir                 STRING  1     64    >99d 0   RWD  /data1/elog/logbook/


Keys in /Elog tree

The keys in the ODB /Elog tree are described in the following sections.

Display Run number

  • Type: BOOL
  • Default: y

This key in the /Elog tree enables/disables displaying the run number in the elog entry. Set to 'y' when the tree is created.




Allow delete

  • Type: BOOL
  • Default: n

This key in the /Elog tree enables/disables deleting an elog entry. Set to 'n' when the tree is created.




Buttons

  • Type: STRING ARRAY
  • Default: 8h 24h 7d

This key in the /Elog tree causes buttons to be created on the Elog Page to permits the user to easily recall Elog messages for up to four possible time spans. The example above shows that all messages in the last 8 hours, 24 hours, or 7 days can be recalled by pressing the appropriate button.




Types

  • Type: STRING ARRAY
  • Default: Routine,Shift summary,Minor error,Severe error,Fix,Question,Info,Modification,Reply,Alarm,Test,Other

This key in the /Elog tree causes a drop-down list of message Types to be created on the Elog Page. The user must select one of these message Types when he/she creates a message. The message types can be customized, or more can be added, by editing the Types key.




Systems

  • Type: STRING ARRAY
  • Default: General,DAQ,Detector,Electronics,Target,Beamline

This key in the /Elog tree causes a drop-down list of Systems to be created on the Elog Page. The user must select one of these Systems when he/she creates a message. The Systems can be customized, or more can be added, by editing the Systems key.




Host name

  • Type: STRING
  • Default: e.g. myhost.triumf.ca

This key in the /Elog tree contains the name of the host machine. It is created and filled automatically when the elog tree is created.



SMTP host

  • Type: STRING
  • Default: localhost

This optional key in the /Elog tree contains the name of the SMTP host machine for sending out email. It must be created and filled by the user if any email is to be sent out apprising user(s) of new Elog messages.



Email [XXX]

  • Type: STRING
  • Default: email address(es) of user(s)

These optional keys in the /Elog tree are created if email is to be sent out when a new ELOG message for a particular Type or System is created. The Type or System name must appear in the Type or System array defined by the keys

For example, if keys "Email Severe error" and "Email DAQ" are created containing suitable email addresses (as in example 3) , email containing the new elog entry will be sent to the appropriate address(es) automatically if the new message is of either Type="Severe error" or System="DAQ".





Url

  • Type: STRING
  • Default:

This optional key in the /Elog tree contains the URL of the host machine that is running the External elog. It is created and filled by the user (see example 4).

If using an Internal Elog, this key is not present.





Logbook Dir

  • Type: STRING
  • Default:

This optional key in the /Elog tree contains the path of a directory to contain the elog files when running the External elog. It is created and filled by the user (see example 4).

If using an Internal Elog, this key is not present.