/Logger ODB tree: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
No edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Pagelinks}}
=== Links ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* [[Keys in the ODB /Logger tree| keys in /Logger tree]]
* [[Keys in the ODB /Logger/Channels subtree |keys in /Logger/Channels subtree]]
* [[Keys in the ODB /Logger/Runlog subtree |keys in /Logger/Runlog subtree]]
* [[Keys in the ODB /Logger/History subtree |keys in /Logger/History subtree]]
* [[/History ODB tree|/History tree]]
* [[mlogger |MIDAS logger utility (mlogger)]]
</div>
=== Creating the /logger tree ===
=== Creating the /logger tree ===
The <span style="color:purple; font-style:italic">/Logger</span>  ODB tree is created when the [[mlogger]] utility is started for the first time. The keys will be filled with default values which users may change as required to customize their experiments.
The <span style="color:purple; font-style:italic">/Logger</span>  ODB tree is created when the [[mlogger]] utility is started for the first time. The keys will be filled with default values which users may change as required to customize their experiments. See [[keys in the ODB /Logger tree]] for more information on each key.  


=== Purpose  ===
=== Purpose  ===
Most of the keys in the <span style="color:purple; font-style:italic;">/Logger</span>  ODB tree are used to '''customize logging''' of the data. There are also keys to customize the [[Messaging]] system.  
Most of the keys in the <span style="color:purple; font-style:italic;">/Logger</span>  ODB tree are used to '''customize logging''' of the data. There are also keys to customize the [[Message System |Messaging]] system.  
The <span style="color:purple; font-style:italic;">/Logger</span>  tree also may contain optional subdirectories  relevent to storing the History and Elog data files (i.e. the
The <span style="color:purple; font-style:italic;">/Logger</span>  tree also may contain optional keys
[[/Logger/Elog]] and [[/Logger/History]] subdirectories. The optional subtree [[/Logger/SQL]] is described in the section mySQL database. The ODB
[[Keys in the ODB /Logger tree #/Logger/Elog dir|/Logger/Elog dir ]] and [[Keys in the ODB /Logger tree #/Logger/History dir |/Logger/History dir]]
<span style="color:purple; font-style:italic;">/History</span>  tree is described in the section [[History Logging]] and the the ODB <span style="color:purple; font-style:italic;">/Elog</span> tree in the [[Elog]] section.
relevent to storing the [[History System | History]] and [[Elog]] data files.  
 
The optional subtrees [[Keys in the ODB /Logger/Runlog/SQL subtree|/Logger/Runlog/SQL]] is used when [[logging to a mySQL database]] and [[Keys in the ODB /Logger/Runlog/ASCII subtree|/Logger/Runlog/ASCII]]for writing to an ASCII file.


=== Example  ===
=== Example  ===
The following example shows a typical <span style="color:purple; font-style:italic">/Logger</span>  ODB tree obtained using the [[odbedit]] '''ls''' command.   
The following example shows a typical <span style="color:purple; font-style:italic">/Logger</span>  ODB tree obtained using the [[odbedit]] '''ls''' command.   
See [[keys in the ODB /Logger tree]] for more information on each key.
Logger                         
    Data dir                    /home/expt/online/data
    Write data                  n
    ODB Dump                    n
    ODB Dump File              run%05d.json
    ODB Last Dump File          last.json
    Auto restart                n
    Auto restart delay          0
    Tape message                y
    Channels                   
        0                     
            Settings           
                Active          y
                Type            Disk
                Filename        run%05d.mid
                Format          MIDAS
                Compression    0
                ODB dump        y
                ODB dump format json
                Log messages    0
                Buffer          SYSTEM
                Event ID        -1
                Trigger mask    -1
                Event limit    0
                Byte limit      0
                Subrun Byte limi0
                Tape capacity  0
                Subdir format 
                Current filenamerun01434.mid.lz4
                Data checksum  CRC32C (one of: NONE CRC32C SHA256 SHA512 ZLIB)
                File checksum  CRC32C (one of: NONE CRC32C SHA256 SHA512 ZLIB)
                Compress        lz4 (one of: none gzip lz4 bzip2 pbzip2)
                Output          FILE (one of: NULL FILE FTP ROOT PIPE)
                Gzip compression0
                Bzip2 compressio0
                Pbzip2 num cpu  0
                Pbzip2 compressi0
                Pbzip2 options 
            Statistics         
                Events written  0
                Bytes written  0
                Bytes written un0
                Bytes written to14419470360
                Bytes written su0
                Files written  31
                Disk level      0.8555651332246208
    Runlog                     
        SQL                   
            Create database    n
            Write data          n
            Hostname            localhost
            Username            root
            Password           
            Database            vslice
            Table              Runlog
            Logfile            sql.log
            Links BOR         
                Run number -> /Runinfo/Run number
                                1521
                Start time -> /Runinfo/Start time
                                Thu Nov 17 03:13:10 2022
            Links EOR         
                Stop time -> /Runinfo/Stop time
                                Thu Nov 17 03:00:39 2022
        ASCII                 
            Write data          y
            filename            runlog.log
            Links BOR         
                Start time -> /Runinfo/Start time
                                Thu Nov 17 03:13:10 2022
                Run number -> /Runinfo/Run number
                                1521
            Links EOR         
                Stop time -> /Runinfo/Stop time
                                Thu Nov 17 03:00:39 2022
                Comment -> /Experiment/Edit on start/Comment
                                FEP Hit Finder
    History                   
        MIDAS                 
            Type                MIDAS
            Active              y
            Debug              0
            PerVariableHistory  0
            History dir       
        ODBC                   
            Type                ODBC
            Active              n
            Debug              0
            Writer_ODBC_DSN    history_writer
            Reader_ODBC_DSN    history_reader
        SQLITE                 
            Type                SQLITE
            Active              n
            Debug              0
            Sqlite dir         
            History dir       
        MYSQL                 
            Type                MYSQL
            Active              n
            Debug              0
            MYSQL Writer        mysql_writer.txt
            MYSQL Reader        mysql_reader.txt
        FILE                   
            Type                FILE
            Active              n
            Debug              0
            History dir       
    Run duration                0
    Next subrun                n
    Subrun duration            0
    Message file date format    json
    Message dir               
    History dir


See [[Explanation of Keys in the ODB /Logger tree]] or click on a key for more information.
== Keys in the /Logger tree ==
Click on the following links for a description of the
* [[Keys in the ODB /Logger tree|keys in the /Logger tree]]
* [[Keys in the ODB /Logger/Channels subtree |keys in /Logger/Channels subtree]]
* [[Keys in the ODB /Logger/Runlog subtree |keys in /Logger/Runlog subtree]]
* [[Keys in the ODB /Logger/History subtree |keys in /Logger/History subtree]]


  ODB Key name                    Value
[[Category:ODB Tree]] [[Category:Data Logging]]
  ---------------------------------------------------------------------------
  Logger
      Data dir                    /isdaq/data1/midas/dlog/current
      Message file                midas.log
      Write data                  y
      ODB Dump                    y
      ODB Dump File              %06d.odb
      Auto restart                n
      Tape message                y
      Channels
          0
              Settings
                  Active            n
                  Type              Disk
                  Filename          %06d.mid
                  Format            MIDAS
                  Compression      0
                  ODB dump          n
                  Log messages      0
                  Buffer            SYSTEM
                  Event ID          -1
                  Trigger mask      -1
                  Event limit      0
                  Byte limit        0
                  Subrun Byte limit 0
                  Tape capacity    0
                  Subdir format
                  Current filename  030300.mid
              Statistic
                  Events written                  60
                  Bytes written                  101864
                  Bytes written uncompressed      101864
                  Bytes written total            8166648992
                  Bytes written subrun            98304
                  Files written                  427
                  Disk level                      0.714018533478346
      Elog Dir                    /isdaq/data1/midas/elog
      Auto restart delay          0
      SQL
          Create database        n
          Write data              n
          Hostname                localhost
          Username                root
          Password
          Database                midas
          Table                  Runlog
          Logfile                sql.log
          Links BOR
              Run number -> /Runinfo/Run number
                                30300
              Start time -> /Runinfo/Start time
                                Fri Jul 26 17:53:03 2013
          Links EOR
              Stop time -> /Runinfo/Stop time
                                Fri Jul 26 18:16:58 2013
      WriteFileHistory            y
      ODBC_Debug                  0
      ODBC_DSN
      Run duration                0
      Next subrun                n
      Subrun duration            0

Latest revision as of 04:20, 17 November 2022


Links

Creating the /logger tree

The /Logger ODB tree is created when the mlogger utility is started for the first time. The keys will be filled with default values which users may change as required to customize their experiments. See keys in the ODB /Logger tree for more information on each key.

Purpose

Most of the keys in the /Logger ODB tree are used to customize logging of the data. There are also keys to customize the Messaging system. The /Logger tree also may contain optional keys /Logger/Elog dir and /Logger/History dir relevent to storing the History and Elog data files.

The optional subtrees /Logger/Runlog/SQL is used when logging to a mySQL database and /Logger/Runlog/ASCIIfor writing to an ASCII file.

Example

The following example shows a typical /Logger ODB tree obtained using the odbedit ls command. See keys in the ODB /Logger tree for more information on each key.

Logger

   Data dir                    /home/expt/online/data
   Write data                  n
   ODB Dump                    n
   ODB Dump File               run%05d.json
   ODB Last Dump File          last.json
   Auto restart                n
   Auto restart delay          0
   Tape message                y
   Channels                    
       0                       
           Settings            
               Active          y
               Type            Disk
               Filename        run%05d.mid
               Format          MIDAS
               Compression     0
               ODB dump        y
               ODB dump format json
               Log messages    0
               Buffer          SYSTEM
               Event ID        -1
               Trigger mask    -1
               Event limit     0
               Byte limit      0
               Subrun Byte limi0
               Tape capacity   0
               Subdir format   
               Current filenamerun01434.mid.lz4
               Data checksum   CRC32C (one of: NONE CRC32C SHA256 SHA512 ZLIB)
               File checksum   CRC32C (one of: NONE CRC32C SHA256 SHA512 ZLIB)
               Compress        lz4 (one of: none gzip lz4 bzip2 pbzip2)
               Output          FILE (one of: NULL FILE FTP ROOT PIPE)
               Gzip compression0
               Bzip2 compressio0
               Pbzip2 num cpu  0
               Pbzip2 compressi0
               Pbzip2 options  
           Statistics          
               Events written  0
               Bytes written   0
               Bytes written un0
               Bytes written to14419470360
               Bytes written su0
               Files written   31
               Disk level      0.8555651332246208
   Runlog                      
       SQL                     
           Create database     n
           Write data          n
           Hostname            localhost
           Username            root
           Password            
           Database            vslice
           Table               Runlog
           Logfile             sql.log
           Links BOR           
               Run number -> /Runinfo/Run number
                               1521
               Start time -> /Runinfo/Start time
                               Thu Nov 17 03:13:10 2022
           Links EOR           
               Stop time -> /Runinfo/Stop time
                               Thu Nov 17 03:00:39 2022
       ASCII                   
           Write data          y
           filename            runlog.log
           Links BOR           
               Start time -> /Runinfo/Start time
                               Thu Nov 17 03:13:10 2022
               Run number -> /Runinfo/Run number
                               1521
           Links EOR           
               Stop time -> /Runinfo/Stop time
                               Thu Nov 17 03:00:39 2022
               Comment -> /Experiment/Edit on start/Comment
                               FEP Hit Finder 
   History                     
       MIDAS                   
           Type                MIDAS
           Active              y
           Debug               0
           PerVariableHistory  0
           History dir         
       ODBC                    
           Type                ODBC
           Active              n
           Debug               0
           Writer_ODBC_DSN     history_writer
           Reader_ODBC_DSN     history_reader
       SQLITE                  
           Type                SQLITE
           Active              n
           Debug               0
           Sqlite dir          
           History dir         
       MYSQL                   
           Type                MYSQL
           Active              n
           Debug               0
           MYSQL Writer        mysql_writer.txt
           MYSQL Reader        mysql_reader.txt
       FILE                    
           Type                FILE
           Active              n
           Debug               0
           History dir         
   Run duration                0
   Next subrun                 n
   Subrun duration             0
   Message file date format    json
   Message dir                 
   History dir

Keys in the /Logger tree

Click on the following links for a description of the