Keys in the ODB /Logger/History subtree: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
(The midas documentation has moved to https://midas.triumf.ca/docs/)
Tag: Replaced
 
Line 1: Line 1:
== Links ==
The midas documentation has moved. See [https://midas.triumf.ca/docs/develop/reference/reference/odb_keys/#loggerhistory /Logger/History] on the ODB keys page and [https://midas.triumf.ca/docs/develop/features/storing_data/history/configuring/#data-destinations-history-drivers Data destinations (history drivers)] on the History: configuring page for the new documentation about the /Logger/History ODB keys.
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* [[/Logger ODB tree| /Logger tree]]
* [[/History ODB tree| /History tree]]
* [[History System]]
* [[Logging to a mySQL database]]
* [[Keys in the ODB /Logger/Channels subtree| /Logger/Channels subtree]]
* [[Keys in the ODB /Logger/SQL subtree| /Logger/SQL subtree]]
* [[mlogger |MIDAS logger (mlogger)]]
</div>
<br>
---------------
<br>
 
=<span style="color: purple;">''/Logger/History''</span> subtree =
 
The ODB <span style="color: purple;">''/Logger/History''</span>  subtree is a subdirectory of the [[Keys in the ODB /Logger tree | ODB /Logger tree]], created
when the MIDAS logger utility [[mlogger]] is started for the first time. The keys will be filled with default values which users may change as required to customize their experiments.
 
When [[mlogger]] is started for the first time, it now creates '''five''' <span style="color: purple;"> /Logger/History/<''history-logging-channel''></span> ODB subtrees to control the five default history-logging-channels'',  named for each of the default
[[History System#History drivers|History drivers]].
 
The keys present in each history-logging-channel are described below.
 
<br>
---------------
<br>
 
= Example  =
The following example shows the <span style="color:purple; font-style:italic">/Logger/History </span>  ODB subtree after creation by [[mlogger]]  (obtained using the [[odbedit]] '''ls''' command). 
See below for information on individual keys.
 
 
<pre>
[local:midas:S]/>ls -r /Logger/History
History
    MIDAS
        Type                    MIDAS
        Active                  y
        Debug                  0
        PerVariableHistory      0
    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
    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
</pre>
 
 
 
<br>
-----
<br>
 
= <span style="color: purple;">''<history-logging-channel>''</span> subtrees =
 
Each <''history-logging-channel''> subtree in the [[#top|Logger/History subtree]]
is created  (by [[mlogger]]) to control one of the [[History System#History drivers|history drivers]] available, and named for that history driver.
<br>Presently the five following history-logging-channel subtrees are created :
* MIDAS
* ODBC
* SQLITE
* MYSQL
* FILE
(see [[#Example|Example]] above).
 
By default, only the MIDAS-history logging channel is [[#active|Active]].
 
;NOTE
: In older MIDAS versions, the history-logging-channel subtrees were named 0,1,2... respectively
 
<br>
-----
<br>
 
== Keys common to all history logging channel subtrees ==
The following three keys are common to all [[#<history-logging-channel> subtrees|history logging channel subtrees]] :
 
 
=== <span style="color: purple;">''Type''</span>===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:'''  [[History System#History drivers|History driver]] name
</div>
 
 
Each [[#<history-logging-channel> subtrees |history-logging-channel subtree]] contains a  <span style="color: purple;">''Type''</span> key which specifies the type of
[[History System#History drivers|History driver]] for this channel.
 
When the subtree is created, the <span style="color: purple;">''Type''</span> key is set to the respective History driver name, e.g.
: ODB key <span style="color: purple;">/Logger/History/'''MIDAS'''/Type</span> will be set to '''"MIDAS"'''
: ODB key <span style="color: purple;">/Logger/History/'''ODBC'''/Type</span> will be set to '''"ODBC"'''
and so on (see [[#Example|Example]] above for all five logging channels).
 
<br>
---------------
<br>
=== <span style="color: purple;">''Active''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Default:'''  "n"
</div>
 
Each [[#<history-logging-channel> subtrees |history-logging-channel subtree]] contains a  <span style="color: purple;">''Active''</span> key
which enables or disables history logging in this channel.
 
By default, only the MIDAS-history logging channel will be set active, i.e. ODB key <span style="color: purple;">/Logger/History/'''MIDAS'''/Active</span> will be set to "y".
 
<br>
;Note
: This key in the [[#MIDAS subtree|MIDAS subtree]]  replaces obsolete key [[Keys in the ODB /Logger tree #/Logger/WriteFileHistory|/Logger/WriteFileHistory]]
 
<br>
--------------
<br>
 
 
 
=== <span style="color: purple;">''Debug''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  0
</div>
 
Each [[#<history-logging-channel> subtrees |history-logging-channel subtree]] contains a  <span style="color: purple;">''Debug''</span> key
which controls the debug level for this channel. If set to 0, debugging is disabled.
 
;Note
:This key in the [[#ODBC subtree|ODBC subtree]]  replaces obsolete key [[Keys in the ODB /Logger tree #/Logger/ODBC_Debug |/Logger/ODBC_Debug]]
 
 
<br>
--------------
<br>
 
 
== <span style="color: purple;">''MIDAS''</span> subtree ==
 
This is the  [[#<history-logging-channel> subtrees| history-logging-channel subtree]]  that  controls  [[History System#History drivers|MIDAS-history]] logging.
 
For those Keys common to all history-logging-channels see
*[[#Type|Type]]
*[[#Active|Active]]
*[[#Debug|Debug]]
 
;Note
: By default, this logging channel will be set active.
 
 
The following section(s) describe keys unique to the <span style="color: purple;">''MIDAS''</span> subtree :
 
 
 
=== <span style="color: purple;">''PerVariableHistory''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  0
</div>
 
This key is present in the [[#MIDAS subtree|MIDAS subtree]] (whose [[#Type|Type]] key set to "MIDAS").
 
The default value of 0 is intended to operate the MIDAS-history in "traditional" mode. In this mode:
* there is one history record for each equipment
* history record id is equal to the equipment id
* Subtrees <span style="color: purple;">/History/Events</span> and <span style="color: purple;">/History/Tags</span> are not required and can be safely deleted
 
 
;Note
: this key replaces obsolete key <span style="color: purple;">/History/PerVariableHistory</span>
 
 
 
<br>
--------------
<br>
 
 
 
 
 
== <span style="color: purple;">''ODBC''</span> subtree ==
 
This is the  [[#<history-logging-channel> subtrees| history-logging-channel subtree]]  that  controls  [[History System#History drivers|ODBC-history]] logging.
 
 
 
For those Keys common to all history-logging-channels see
*[[#Type|Type]]
*[[#Active|Active]]
*[[#Debug|Debug]]
 
;Note
:[[#Debug|Debug]] key in this subtree  replaces obsolete key [[Keys in the ODB /Logger tree #/Logger/ODBC_Debug |/Logger/ODBC_Debug]].
 
 
The following section(s) describe keys unique to the ODBC subtree:
 
 
=== <span style="color: purple;">''Writer_ODBC_DSN''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:'''  "history_writer"
</div>
 
This key is present in the  [[#ODBC subtree|ODBC]] subtree  (whose [[#Type|Type]] key is set to "ODBC").
 
It contains the ODBC Data Source Name for writing and is used by [[mlogger]].
 
;Note
: this key replaces obsolete key [[Keys in the ODB /Logger tree #/Logger/ODBC DSN |/Logger/ODBC DSN]]
<br>
--------------
<br>
 
=== <span style="color: purple;">''Reader_ODBC_DSN''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:'''  "history_reader"
</div>
 
This key is present in the [[#ODBC subtree|ODBC]] subtree  (whose [[#Type|Type]] key is set to "ODBC").
 
It contains the ODBC Data Source Name for reading, and is used by [[mhttpd]] and [[mhist]] utilities.
 
;Note
: this key replaces obsolete key  <span style="color: purple;">/history/ODB_DSN</span>
 
 
 
<br>
--------------
<br>
 
 
 
 
== <span style="color: purple;">''SQLITE''</span> subtree ==
 
 
This is the  [[#<history-logging-channel> subtrees| history-logging-channel subtree]]  that  controls  [[History System#History drivers|SQLITE-history]] logging.
 
 
 
For those Keys common to all history-logging-channels see
*[[#Type|Type]]
*[[#Active|Active]]
*[[#Debug|Debug]]
 
The following section(s) describe keys unique to the SQLITE subtree :
 
 
 
 
=== <span style="color: purple;">''Sqlite dir''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:''' 
</div>
 
This key is present in the [[#SQLITE subtree|SQLITE subtree]]  (whose [[#Type|Type]] key is set to "SQLITE").
 
It contains the location of SQLITE database files, and is of the form "/file/system/path".
 
 
<br>
--------------
<br>
 
== <span style="color: purple;">''MYSQL''</span> subtree ==
 
 
This is the [[#<history-logging-channel> subtrees| history-logging-channel subtree]]  that  controls  [[History System#History drivers|MYSQL-history]] logging.
 
 
 
For those Keys common to all history-logging-channels see
*[[#Type|Type]]
*[[#Active|Active]]
*[[#Debug|Debug]]
 
The following section(s) describe keys unique to the MYSQL subtree :
 
 
 
=== <span style="color: purple;">''MYSQL Writer''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:'''  mysql_writer.txt
</div>
 
This key is present in the [[#MYSQL subtree|MYSQL subtree]]  (whose [[#Type|Type]] key is set to "MYSQL").
 
It contains the name of the config file for the MYSQL database and the history writer account. This file should look similar to the following: see [[History_System#Write_MYSQL-history_events]]
<br>
--------------
<br>
 
=== <span style="color: purple;">''MYSQL Reader''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:'''  mysql_reader.txt
</div>
 
This key is present in the [[#MYSQL subtree|MYSQL subtree]]  (whose  [[#Type|Type]] key is set to "MYSQL").
 
It contains the name of the config file for the MYSQL database and the history reader account. This file should look similar to the following: see [[History_System#Write_MYSQL-history_events]]
<br>
--------------
<br>
 
== <span style="color: purple;">''FILE''</span> subtree ==
 
 
This is the  [[#<history-logging-channel> subtrees| history-logging-channel subtree]]  that  controls  [[History System#History drivers|FILE-history]] logging.
 
 
 
For those Keys common to all history-logging-channels see
*[[#Type|Type]]
*[[#Active|Active]]
*[[#Debug|Debug]]
 
The following section(s) describe keys unique to the FILE subtree :
 
 
 
=== <span style="color: purple;">''History dir''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:'''  ""
</div>
 
This key is present in the [[#FILE subtree|FILE subtree]]  (whose [[#Type|Type]] key is set to "FILE").
 
It contains the name of the directory in which the FILE-history files are to be stored.
 
<br>
--------------
<br>
 
[[Category: Logger Tree]] [[Category:History]]

Latest revision as of 22:00, 30 October 2026

The midas documentation has moved. See /Logger/History on the ODB keys page and Data destinations (history drivers) on the History: configuring page for the new documentation about the /Logger/History ODB keys.