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

From MidasWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
==== Links ====
== Links ==
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* [[/Logger ODB tree| /Logger tree]]  
* [[/Logger ODB tree| /Logger tree]]  
Line 11: Line 11:
<br>
<br>


== <span style="color: purple;">''/Logger/History''</span> subtree ==
=<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
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 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 creates '''three'''<span style="color: purple;"> /Logger/History</span> ODB subtrees
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
<span style="color: purple;">''0,1''</span> and <span style="color: purple;">''2''</span> as shown in the following example:
[[History System#History drivers|History drivers]].


=== Example  ===
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).   
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.  
See below for information on individual keys.  


[local:pol:S]/>cd /logger
 
[local:pol:S]/Logger>ls -r history
<pre>
History
[local:midas:S]/>ls -r /Logger/History
     0
History
     MIDAS
         Type                    MIDAS
         Type                    MIDAS
         Active                  y
         Active                  y
         Debug                  0
         Debug                  0
         PerVariableHistory      0
         PerVariableHistory      0
     1
     ODBC
         Type                    ODBC
         Type                    ODBC
         Active                  n
         Active                  n
Line 37: Line 44:
         Writer_ODBC_DSN        history_writer
         Writer_ODBC_DSN        history_writer
         Reader_ODBC_DSN        history_reader
         Reader_ODBC_DSN        history_reader
     2
     SQLITE
         Type                    SQLITE
         Type                    SQLITE
         Active                  n
         Active                  n
         Debug                  0
         Debug                  0
         Sqlite dir
         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>


The three subtrees are each a <''history-logging-channel''> created
to control one of the three [[History System#History drivers|history drivers]] available, i.e. MIDAS, ODBC and SQLITE.
Each subdirectory is created with a different value in the
<span style="color:purple; font-style:italic">subkey "Type"</span>, i.e.
* Subtree  <span style="color: purple;">''0''</span> for MIDAS-history  (key <span style="color:purple; font-style:italic">Type</span> set to "MIDAS")
* Subtree  <span style="color: purple;">''1''</span> for ODBC-history  (key <span style="color:purple; font-style:italic">Type</span> set to "ODBC")
* Subtree  <span style="color: purple;">''2''</span> for SQLITE-history (key <span style="color:purple; font-style:italic">Type</span> set to "SQLITE")




The keys present in each <''history-logging-channel''> are described below.
<br>
<br>
-----
-----
<br>
<br>


== <span style="color: purple;">''/Logger/History/0/''</span> subtree ==
= <span style="color: purple;">''<history-logging-channel>''</span> subtrees =


By default, this subtree  (<span style="color: purple;"><''history-logging-channel''> = "0"</span>)  controls history logging of events using the [[History System#History drivers|MIDAS-history driver]].
Each <''history-logging-channel''> subtree in the [[#top|/Logger/History|Logger/History subtree]]
is created to control one of the [[History System#History drivers|history drivers]] available, and named for that history driver.


<br>
<br>
Line 67: Line 77:
<br>
<br>


=== <span style="color: purple;">''/Logger/History/0/Type''</span> ===
== Keys common to all history logging channels ==
The following three keys are common to all history logging channel  subtrees :
 
 
=== <span style="color: purple;">''Type''</span>===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Type:''' STRING
* '''Default:'''  MIDAS
* '''Default:'''  [[History System#History drivers|History driver]] name
</div>  
</div>  


This key specifies the type of history logging for this <''history-logging-channel''>.  
Each [[#/Logger/History/<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 history-logging-channel.
 
[[mlogger]] creates each channel with this key set to the ''history-logging-channel'', e.g.
for MIDAS-history logging ;
: <span style="color: purple;">/Logger/History/'''MIDAS'''/Type</span> will be set to '''"MIDAS"'''
* for ODBC-history logging 
** <span style="color: purple;">/Logger/History/'''ODBC'''/Type</span> will be set to '''"ODBC"'''
etc.  


[[mlogger]] creates this channel with this key set to "MIDAS" since by default this subtree,  i.e.  (<span style="color: purple;"><''history-logging-channel''> = "0"</span>),  controls
(see [[#Example|Example]] above).
[[History System#History drivers|MIDAS-history]] logging.


<br>
<br>
----------
---------------
<br>
<br>
 
=== <span style="color: purple;">''Active''</span> ===
 
 
=== <span style="color: purple;">''/Logger/History/0/Active''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Type:''' BOOL
* '''Default:'''  "y"
* '''Default:'''  "n"
</div>
</div>


Since this subtree, i.e.  (<span style="color: purple;"><''history-logging-channel''> = "0"</span>) by default controls MIDAS-history logging (see [[#/Logger/History/0/Type|Type]]),
Each [[#/Logger/History/<history-logging-channel> subtrees |''<history-logging-channel> subtree'']] contains a <span style="color: purple;">''Active''</span> key
* if set to "y", MIDAS-history logging is active; [[mlogger]] will write data into this channel.
which enables or disables history logging in this history-logging-channel.
* if set to "n" to  MIDAS-history logging is disabled.
 
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:this key replaces obsolete key  
Note;
: this key in the <span style="color: purple;">/Logger/History/MIDAS</span> subtree  replaces obsolete key  
[[Keys in the ODB /Logger tree #/Logger/WriteFileHistory|/Logger/WriteFileHistory]]  
[[Keys in the ODB /Logger tree #/Logger/WriteFileHistory|/Logger/WriteFileHistory]]  


Line 104: Line 124:




=== <span style="color: purple;">''/Logger/History/0/Debug''</span> ===
=== <span style="color: purple;">''Debug''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Type:''' INT
Line 110: Line 130:
</div>
</div>


This key controls the debug level.
Each [[#/Logger/History/<history-logging-channel> subtrees |''<history-logging-channel> subtree'']] contains a  <span style="color: purple;">''Debug''</span> key
If set to 0, debug is disabled for this <''history-logging-channel''>.
which controls the debug level for this <''history-logging-channel''>. If set to 0, debugging is disabled.
 
Note;
:[[#Debug|Debug]] key in the [[#ODBC subtree|ODBC subtree]]  replaces obsolete key
[[Keys in the ODB /Logger tree #/Logger/ODBC_Debug |/Logger/ODBC_Debug]]
 


<br>
<br>
Line 117: Line 142:
<br>
<br>


== <span style="color: purple;">''MIDAS''</span> subtree ==
This is the  [[#<history-logging-channel> subtrees| history-logging-channel subtree]]  that  controls MIDAS-history logging.




=== <span style="color: purple;">''/Logger/History/0/PerVariableHistory''</span> ===
The following section(s) describe keys unique to the MIDAS subtree.
 
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.
 
=== <span style="color: purple;">''PerVariableHistory''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Type:''' INT
Line 125: Line 164:
</div>
</div>


This key is present in a history channel of Type "MIDAS" only (see  [[#/Logger/History/0/Type|Type key]]).  
This key is present in the  [[#MIDAS|MIDAS-history logging  subtree]] only (i.e. 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 133: Line 172:




Note: this key replaces obsolete key /history/PerVariableHistory
Note;
: this key replaces obsolete key <span style="color: purple;">/History/PerVariableHistory</span>
<br>
<br>
--------------
--------------
Line 142: Line 182:




== <span style="color: purple;">''ODBC''</span> subtree ==


This is the  [[<history-logging-channel> subtrees| history-logging-channel subtree]]  that  controls ODBC-history logging.


The following section(s) describe keys unique to the MIDAS subtree.


== <span style="color: purple;">''/Logger/History/1/''</span> subtree ==
For those Keys common to all history-logging-channels see
*[[#Type|Type]]
*[[#Active|Active]]
*[[#Debug|Debug]]


By default, this subtree controls history logging of ODBC.
Note:[[#Debug|Debug]] key in this subtree replaces obsolete key
[[Keys in the ODB /Logger tree #/Logger/ODBC_Debug |/Logger/ODBC_Debug]]






=== <span style="color: purple;">''/Logger/History/1/Type''</span> ===
=== <span style="color: purple;">''Writer_ODBC_DSN''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Type:''' STRING
* '''Default:'''  "ODBC"
* '''Default:'''  "history_writer"
</div>
 
This key specifies the type of history logging for this ''history-logging-channel''.
 
[[mlogger]] creates this channel with this key set to "ODBC" since by default this subtree  <span style="color: purple;">''1''</span>  controls ODBC history logging.
 
<br>
----------
<br>
 
 
=== <span style="color: purple;">''/Logger/History/1/Active''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Default:'''  "n"
</div>
 
If set to "y", ODBC history logging is active.  ODBC data are written into this channel.
See also [[#/Logger/History/1/Type|Type key]].
 
 
 
=== <span style="color: purple;">''/Logger/History/1/Debug''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  0
</div>
</div>


This key holds the debug level for this channel.
This key is present in the [[#ODBC subtree|ODBC-history logging subtree]] only  (i.e. with [[#Type|Type]] key set to "ODBC").
If set to 0, debug is disabled for ODBC history logging.
It contains the ODBC Data Source Name for writing and is used by [[mlogger]].
 
See also [[#/Logger/History/1/Type|Type key]].  
 
 
Note: this key replaces obsolete key
[[Keys in the ODB /Logger tree #/Logger/ODBC_Debug |/Logger/ODBC_Debug]]  
<br>
--------------
<br>
 
=== <span style="color: purple;">''/Logger/History/1/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 a history channel of Type "ODBC" only.  It contains the ODBC Data Source Name for writing and is used by [[mlogger]].


See also [[#/Logger/History/1/Type|Type key]].


Note: this key replaces obsolete key  
Note;
: this key replaces obsolete key  
[[Keys in the ODB /Logger tree #/Logger/ODBC DSN |/Logger/ODBC DSN]]  
[[Keys in the ODB /Logger tree #/Logger/ODBC DSN |/Logger/ODBC DSN]]  
<br>
<br>
Line 211: Line 216:
<br>
<br>


=== <span style="color: purple;">''/Logger/History/1/Reader_ODBC_DSN''</span> ===
=== <span style="color: purple;">''Reader_ODBC_DSN''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Type:''' STRING
Line 217: Line 222:
</div>
</div>


This key is present in a history channel of Type "ODBC" only. It contains the ODBC Data Source Name for reading, and is used by [[mhttpd]] and [[mhist]] utilities.
This key is present in the  [[#ODBC subtree|ODBC-history logging subtree]] only (i.e. with [[#Type|Type]] key set to "ODBC").
It contains the ODBC Data Source Name for reading, and is used by [[mhttpd]] and [[mhist]] utilities.


See also [[#/Logger/History/1/Type|Type key]].


Note: this key replaces obsolete key /history/ODB_DSN
 
Note;
: this key replaces obsolete key /history/ODB_DSN




Line 232: Line 239:




== <span style="color: purple;">''/Logger/History/2/''</span> subtree ==
== <span style="color: purple;">''SQLITE''</span> subtree ==


This subtree controls history logging of SQLITE
This is the  [[<history-logging-channel> subtrees| history-logging-channel subtree]]  that  controls SQLITE-history logging.


The following section(s) describe keys unique to the SQLITE subtree.


=== <span style="color: purple;">''/Logger/History/2/Type''</span> ===
For those Keys common to all history-logging-channels see
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
*[[#Type|Type]]
* '''Type:''' STRING
*[[#Active|Active]]
* '''Default:'''  "SQLITE"
*[[#Debug|Debug]]
</div>


This key specifies the type of history logging for this <''history-logging-channel''>.
[[mlogger]] creates this channel with this key set to "SQLITE" since this subtree  <span style="color: purple;">''2''</span>  controls SQLITE history logging.
<br>
----------
<br>
=== <span style="color: purple;">''/Logger/History/2/Active''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Default:'''  "n"
</div>
If set to "y", SQLITE history logging is active.
See also [[#/Logger/History/2/Type|Type key]].
=== <span style="color: purple;">''/Logger/History/2/Debug''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  0
</div>
This key contains the debug level for this channel.
If set to 0, debug is disabled for SQLITE history logging.
See also [[#/Logger/History/2/Type|Type key]].




Line 279: Line 257:




=== <span style="color: purple;">''/Logger/History/2/Sqlite dir''</span> ===
=== <span style="color: purple;">''Sqlite dir''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Type:''' STRING
Line 285: Line 263:
</div>
</div>


This key contains the location of SQLITE database files, and is of the form "/file/system/path".
This key is present in the  [[#SQLITE subtree|SQLITE-history logging subtree]] only (i.e. with [[#Type|Type]] key set to "SQLITE").
 
This key is present in a history channel of Type "SQLITE" only, and is created by [[mlogger]].


See also [[#/Logger/History/2/Type|Type key]].
It contains the location of SQLITE database files, and is of the form "/file/system/path".

Revision as of 15:12, 19 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|Logger/History subtree is created to control one of the history drivers available, and named for that history driver.




Keys common to all history logging channels

The following three keys are common to all history logging channel subtrees :


Type

Each <history-logging-channel> subtree contains a Type key which specifies the type of History driver for this history-logging-channel.

mlogger creates each channel with this key set to the history-logging-channel, e.g. for MIDAS-history logging ;

/Logger/History/MIDAS/Type will be set to "MIDAS"
  • for ODBC-history logging
    • /Logger/History/ODBC/Type will be set to "ODBC"

etc.

(see Example above).




Active

  • Type: BOOL
  • Default: "n"

Each <history-logging-channel> subtree contains a Active key which enables or disables history logging in this history-logging-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 /Logger/History/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;

Debug 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.


The following section(s) describe keys unique to the MIDAS subtree.

For those Keys common to all history-logging-channels see

Note;

By default, this logging channel will be set active.

PerVariableHistory

  • Type: INT
  • Default: 0

This key is present in the MIDAS-history logging subtree only (i.e. 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.

The following section(s) describe keys unique to the MIDAS subtree.

For those Keys common to all history-logging-channels see

Note:Debug key in this subtree replaces obsolete key /Logger/ODBC_Debug


Writer_ODBC_DSN

  • Type: STRING
  • Default: "history_writer"

This key is present in the ODBC-history logging subtree only (i.e. 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 the ODBC-history logging subtree only (i.e. 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.

The following section(s) describe keys unique to the SQLITE subtree.

For those Keys common to all history-logging-channels see






Sqlite dir

  • Type: STRING
  • Default:

This key is present in the SQLITE-history logging subtree only (i.e. with Type key set to "SQLITE").

It contains the location of SQLITE database files, and is of the form "/file/system/path".