Mlogger: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:
---------------
---------------
<br>
<br>
== mlogger - MIDAS Logger ==
== Logging in MIDAS ==


The MIDAS Logger, <span style="color:darkcyan;">''mlogger''</span> is supplied in the MIDAS package. This utility can perform several functions (selected by the user via the  
The MIDAS Logger, <span style="color:darkcyan;">''mlogger''</span> is supplied in the MIDAS package. This utility can perform several functions (selected by the user via the  

Revision as of 16:51, 14 August 2013

Links



Logging in MIDAS

The MIDAS Logger, mlogger is supplied in the MIDAS package. This utility can perform several functions (selected by the user via the /Logger ODB tree ) including:

  • logging System messages to a Message file or as message events
  • logging information to a mySQL database
  • writing information to an electronic logbook
  • collecting and logging history events
  • logging experimental data from one or more frontends to storage device(s) such as disk or tape
  • multiple Logging Channels can be defined
  • several different storage devices, formats and compression levels can be selected
  • data can be logged to different subdirectories on disk
  • data can be logged to a remote computer, using the FTP mode
  • events can be selected for logging by Event ID or Trigger mask
  • Event Filtering can be implemented
  • runs can be automatically stopped and restarted after a certain number of events, or a certain time
  • the complete ODB contents can be saved
    • into a file at the beginning and/or end of run
    • and/or into the data stream

The mlogger utility runs on the backend computer, receiving events from the buffer manager. It supports three type of storage devices so far, i.e.

  • Disk,
  • Tape
  • FTP channel to a remote computer.

Data can currently be written in five different formats :

  • MIDAS binary,
  • ASCII,
  • ROOT
  • DUMP

The user may of course write their own custom data logger to save the data in any format they choose.

mlogger creates the /Logger ODB tree

When mlogger is started for the first time, it creates the /Logger ODB tree (including a single logger channel - channel 0), and fills it with default settings. The /Logger tree contains all the relevant information for mlogger to run properly. The user has no code to write in order for the system to operate correctly. However, the user will want to customize the logger for his/her own experiment, by setting the keys in the /Logger tree to suitable values.


In addition to the /Logger tree, mlogger also creates the /History ODB tree, used in the optional History System features. If MIDAS is compiled with mySQL support, a /Logger/SQL subtree will also be created in the /Logger tree (see logging to a mySQL database).

The data channels as well as the history logging are rescanned automatically at each start transition. In other words, additional logging channels can be defined while running, but the effect will take place only at the following start transition.



Starting mlogger utility

   Arguments
       [-h ] : help
       [-e exptname ] : experiment name (see odbedit - ODB Editor and run control utility)
       [-D ] : start program as a daemon (UNIX only).
       [-s] : Save mode (debugging: protect ODB).
       [-v] : Verbose (not to be used in conjunction with -D).
   Usage
    >mlogger -D 

Notes

  • The mlogger application requires an existing /Equipment ODB tree.
  • When mlogger is started for the first time, it creates the /Logger, the /History and the /Elog ODB trees with default values.
  • Once mlogger is running, you should be able to monitor its state with mstat or with mhttpd.

Data storage location

If mlogger is started interactively (i.e. without the argument [-D ]) The following information will be displayed :

$ mlogger
Log     directory is    <default directory>
Data    directory is same as Log unless specified in channels/
History directory is same as Log 
ELog    directory is same as Log 
MIDAS logger started. Stop with "!"

NOTE: