Keys in the ODB /Logger/History subtree: Difference between revisions
No edit summary |
No edit summary |
||
Line 70: | Line 70: | ||
= <span style="color: purple;">''<history-logging-channel>''</span> subtrees = | = <span style="color: purple;">''<history-logging-channel>''</span> subtrees = | ||
Each <''history-logging-channel''> subtree in the [[#top | Each <''history-logging-channel''> subtree in the [[#top|Logger/History subtree]] | ||
is created to control one of the [[History System#History drivers|history drivers]] available, and named for that history driver. | 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 one of these channels is [[#active|Active]]. | |||
<br> | <br> | ||
Line 77: | Line 86: | ||
<br> | <br> | ||
== Keys common to all history logging | == Keys common to all history logging channel subtrees == | ||
The following three keys are common to all history logging channel | The following three keys are common to all [[#<history-logging-channel> subtrees|history logging channel subtrees]] : | ||
Line 87: | Line 96: | ||
</div> | </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. | |||
: <span style="color: purple;">/Logger/History/'''MIDAS'''/Type</span> will be set to '''"MIDAS"''' | : <span style="color: purple;">/Logger/History/'''MIDAS'''/Type</span> will be set to '''"MIDAS"''' | ||
: <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). | |||
(see [[#Example|Example]] above). | |||
<br> | <br> | ||
Line 108: | Line 115: | ||
</div> | </div> | ||
Each [[# | 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 | which enables or disables history logging in this channel. | ||
By default, only the MIDAS-history logging channel will be set active, i.e. <span style="color: purple;">/Logger/History/'''MIDAS'''/Active</span> will be set to "y". | By default, only the MIDAS-history logging channel will be set active, i.e. <span style="color: purple;">/Logger/History/'''MIDAS'''/Active</span> will be set to "y". | ||
<br> | <br> | ||
Note | ;Note | ||
: | : This key in the [[#MIDAS subtree|MIDAS subtree]] replaces obsolete key [[Keys in the ODB /Logger tree #/Logger/WriteFileHistory|/Logger/WriteFileHistory]] | ||
[[Keys in the ODB /Logger tree #/Logger/WriteFileHistory|/Logger/WriteFileHistory]] | |||
<br> | <br> | ||
Line 130: | Line 136: | ||
</div> | </div> | ||
Each [[# | 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 <''history-logging-channel''>. If set to 0, debugging is disabled. | which controls the debug level for this <''history-logging-channel''>. If set to 0, debugging is disabled. | ||
Note; | Note; | ||
: | :This key in the [[#ODBC subtree|ODBC subtree]] replaces obsolete key [[Keys in the ODB /Logger tree #/Logger/ODBC_Debug |/Logger/ODBC_Debug]] | ||
[[Keys in the ODB /Logger tree #/Logger/ODBC_Debug |/Logger/ODBC_Debug]] | |||
Line 146: | Line 151: | ||
This is the [[#<history-logging-channel> subtrees| history-logging-channel subtree]] that controls MIDAS-history logging. | This is the [[#<history-logging-channel> subtrees| history-logging-channel subtree]] that controls MIDAS-history logging. | ||
For those Keys common to all history-logging-channels see | For those Keys common to all history-logging-channels see | ||
Line 155: | Line 157: | ||
*[[#Debug|Debug]] | *[[#Debug|Debug]] | ||
Note | ;Note | ||
: By default, this logging channel will be set active. | : By default, this logging channel will be set active. | ||
The following section(s) describe keys unique to the MIDAS subtree : | |||
<br> | |||
-------------- | |||
<br> | |||
=== <span style="color: purple;">''PerVariableHistory''</span> === | === <span style="color: purple;">''PerVariableHistory''</span> === | ||
Line 164: | Line 173: | ||
</div> | </div> | ||
This key is present in | This key is present in this subtree only (i.e. [[#MIDAS|MIDAS]] subtree with [[#Type|Type]] key set to "MIDAS"). | ||
The default value of 0 is intended to operate the MIDAS-history in "traditional" mode. In this mode: | The default value of 0 is intended to operate the MIDAS-history in "traditional" mode. In this mode: | ||
Line 172: | Line 181: | ||
Note | ;Note | ||
: this key replaces obsolete key <span style="color: purple;">/History/PerVariableHistory</span> | : this key replaces obsolete key <span style="color: purple;">/History/PerVariableHistory</span> | ||
<br> | <br> | ||
Line 186: | Line 195: | ||
This is the [[<history-logging-channel> subtrees| history-logging-channel subtree]] that controls ODBC-history logging. | This is the [[<history-logging-channel> subtrees| history-logging-channel subtree]] that controls ODBC-history logging. | ||
For those Keys common to all history-logging-channels see | For those Keys common to all history-logging-channels see | ||
Line 193: | Line 202: | ||
*[[#Debug|Debug]] | *[[#Debug|Debug]] | ||
Note:[[#Debug|Debug]] key in this subtree replaces obsolete key | ;Note | ||
[[Keys in the ODB /Logger tree #/Logger/ODBC_Debug |/Logger/ODBC_Debug]] | :[[#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: | |||
Line 204: | Line 215: | ||
</div> | </div> | ||
This key is present in | This key is present in this subtree only (i.e. [[#ODBC|ODBC]] subtree with [[#Type|Type]] key set to "ODBC"). | ||
It contains the ODBC Data Source Name for writing and is used by [[mlogger]]. | 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]] | |||
Note | |||
: this key replaces obsolete key | |||
[[Keys in the ODB /Logger tree #/Logger/ODBC DSN |/Logger/ODBC DSN]] | |||
<br> | <br> | ||
-------------- | -------------- | ||
Line 222: | Line 231: | ||
</div> | </div> | ||
This key is present in | This key is present in this subtree only (i.e. [[#ODBC|ODBC]] subtree with [[#Type|Type]] key set to "ODBC"). | ||
It contains the ODBC Data Source Name for reading, and is used by [[mhttpd]] and [[mhist]] utilities. | 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> | |||
Note | |||
: this key replaces obsolete key /history/ODB_DSN | |||
Line 240: | Line 248: | ||
== <span style="color: purple;">''SQLITE''</span> subtree == | == <span style="color: purple;">''SQLITE''</span> subtree == | ||
This is the [[<history-logging-channel> subtrees| history-logging-channel subtree]] that controls SQLITE-history logging. | This is the [[<history-logging-channel> subtrees| history-logging-channel subtree]] that controls SQLITE-history logging. | ||
For those Keys common to all history-logging-channels see | For those Keys common to all history-logging-channels see | ||
Line 250: | Line 259: | ||
*[[#Debug|Debug]] | *[[#Debug|Debug]] | ||
The following section(s) describe keys unique to the SQLITE subtree : | |||
<br> | <br> | ||
Line 263: | Line 272: | ||
</div> | </div> | ||
This key is present in | This key is present in this subtree only (i.e. [[#SQLITE|SQLITE]] subtree with [[#Type|Type]] key set to "SQLITE"). | ||
It contains the location of SQLITE database files, and is of the form "/file/system/path". | It contains the location of SQLITE database files, and is of the form "/file/system/path". | ||
== <span style="color: purple;">''MYSQL''</span> subtree == | |||
This is the [[<history-logging-channel> subtrees| history-logging-channel subtree]] that controls 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 this subtree only (i.e. [[#MYSQL|MYSQLSQL]] subtree with [[#Type|Type]] key set to "MYSQL"). | |||
It contains the name of the file ... | |||
<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 this subtree only (i.e. [[#MYSQL|MYSQL]] subtree with [[#Type|Type]] key set to "MYSQL"). | |||
It contains the name of the file ... | |||
<br> | |||
-------------- | |||
<br> | |||
== <span style="color: purple;">''FILE''</span> subtree == | |||
This is the [[<history-logging-channel> subtrees| history-logging-channel subtree]] that controls 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 this subtree only (i.e. [[#FILE|FILE]] subtree with [[#Type|Type]] key set to "FILE"). | |||
It contains the name of the directory in which the FILE-history files are to be stored. |
Revision as of 12:41, 20 June 2014
Links
/Logger/History subtree
The ODB /Logger/History subtree is a subdirectory of the 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 /Logger/History/<history-logging-channel> ODB subtrees to control the five default history-logging-channels, named for each of the default History drivers.
The keys present in each history-logging-channel are described below.
Example
The following example shows the /Logger/History ODB subtree after creation by mlogger (obtained using the odbedit ls command). See below for information on individual keys.
[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
<history-logging-channel> subtrees
Each <history-logging-channel> subtree in the Logger/History subtree
is created (by mlogger) to control one of the history drivers available, and named for that history driver.
Presently the five following history-logging-channel subtrees are created :
- MIDAS
- ODBC
- SQLITE
- MYSQL
- FILE
(see Example above).
By default, only one of these channels is Active.
Keys common to all history logging channel subtrees
The following three keys are common to all history logging channel subtrees :
Type
- Type: STRING
- Default: History driver name
Each history-logging-channel subtree contains a Type key which specifies the type of
History driver for this channel.
When the subtree is created, the Type key is set to the respective History driver name, e.g.
- /Logger/History/MIDAS/Type will be set to "MIDAS"
- /Logger/History/ODBC/Type will be set to "ODBC"
and so on (see Example above for all five logging channels).
Active
- Type: BOOL
- Default: "n"
Each <history-logging-channel> subtree contains a Active key which enables or disables history logging in this channel.
By default, only the MIDAS-history logging channel will be set active, i.e. /Logger/History/MIDAS/Active will be set to "y".
- Note
- This key in the MIDAS subtree replaces obsolete key /Logger/WriteFileHistory
Debug
- Type: INT
- Default: 0
Each <history-logging-channel> subtree contains a Debug key which controls the debug level for this <history-logging-channel>. If set to 0, debugging is disabled.
Note;
- This key in the ODBC subtree replaces obsolete key /Logger/ODBC_Debug
MIDAS subtree
This is the history-logging-channel subtree that controls MIDAS-history logging.
For those Keys common to all history-logging-channels see
- Note
- By default, this logging channel will be set active.
The following section(s) describe keys unique to the MIDAS subtree :
PerVariableHistory
- Type: INT
- Default: 0
This key is present in this subtree only (i.e. MIDAS subtree with 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
- /History/Events and /History/Tags are not required and can be safely deleted
- Note
- this key replaces obsolete key /History/PerVariableHistory
ODBC subtree
This is the [[<history-logging-channel> subtrees| history-logging-channel subtree]] that controls ODBC-history logging.
For those Keys common to all history-logging-channels see
- Note
- Debug key in this subtree replaces obsolete key /Logger/ODBC_Debug.
The following section(s) describe keys unique to the ODBC subtree:
Writer_ODBC_DSN
- Type: STRING
- Default: "history_writer"
This key is present in this subtree only (i.e. ODBC subtree with Type key set to "ODBC").
It contains the ODBC Data Source Name for writing and is used by mlogger.
- Note
- this key replaces obsolete key /Logger/ODBC DSN
Reader_ODBC_DSN
- Type: STRING
- Default: "history_reader"
This key is present in this subtree only (i.e. ODBC subtree with Type key 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 /history/ODB_DSN
SQLITE subtree
This is the [[<history-logging-channel> subtrees| history-logging-channel subtree]] that controls SQLITE-history logging.
For those Keys common to all history-logging-channels see
The following section(s) describe keys unique to the SQLITE subtree :
Sqlite dir
- Type: STRING
- Default:
This key is present in this subtree only (i.e. SQLITE subtree with Type key set to "SQLITE").
It contains the location of SQLITE database files, and is of the form "/file/system/path".
MYSQL subtree
This is the [[<history-logging-channel> subtrees| history-logging-channel subtree]] that controls MYSQL-history logging.
For those Keys common to all history-logging-channels see
The following section(s) describe keys unique to the MYSQL subtree :
MYSQL Writer
- Type: STRING
- Default: mysql_writer.txt
This key is present in this subtree only (i.e. MYSQLSQL subtree with Type key set to "MYSQL").
It contains the name of the file ...
MYSQL Reader
- Type: STRING
- Default: mysql_reader.txt
This key is present in this subtree only (i.e. MYSQL subtree with Type key set to "MYSQL").
It contains the name of the file ...
FILE subtree
This is the [[<history-logging-channel> subtrees| history-logging-channel subtree]] that controls FILE-history logging.
For those Keys common to all history-logging-channels see
The following section(s) describe keys unique to the FILE subtree :
History dir
- Type: STRING
- Default: ""
This key is present in this subtree only (i.e. FILE subtree with Type key set to "FILE").
It contains the name of the directory in which the FILE-history files are to be stored.