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 43: Line 43:
         Sqlite dir
         Sqlite dir


The three subtrees are each a ''history-logging-channel'' created
The three subtrees are each a <''history-logging-channel''> created
to control one of the three different types of history logging available, i.e. MIDAS, ODBC and SQLITE.
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  
Each subdirectory is created with a different value in the  
<span style="color:purple; font-style:italic">subkey "Type"</span>, i.e.
<span style="color:purple; font-style:italic">subkey "Type"</span>, i.e.


* Subtree  <span style="color: purple;">''0''</span> for MIDAS  (key <span style="color:purple; font-style:italic">Type</span> set to "MIDAS")
* 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  (key <span style="color:purple; font-style:italic">Type</span> set to "ODBC")
* 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 (key <span style="color:purple; font-style:italic">Type</span> set to "SQLITE")
* 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.
The keys present in each <''history-logging-channel''> are described below.
<br>
<br>
-----
-----
Line 61: Line 61:
== <span style="color: purple;">''/Logger/History/0/''</span> subtree ==
== <span style="color: purple;">''/Logger/History/0/''</span> subtree ==


By default, this subtree controls history logging of Midas events.
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]].


<br>
<br>
Line 73: Line 73:
</div>  
</div>  


This key specifies the type of history logging for this ''history-logging-channel''.  
This key specifies the type of history logging for this <''history-logging-channel''>.  


[[mlogger]] creates this channel with this key set to "MIDAS" since this subtree,  i.e. <span style="color: purple;">''0''</span>, controls MIDAS history logging.
[[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  
[[History System#History drivers|MIDAS-history]] logging.


<br>
<br>
Line 89: Line 90:
</div>
</div>


Since this subtree,  i.e. <span style="color: purple;">''0''</span>controls MIDAS history logging (see [[#/Logger/History/0/Type|Type]]),
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]]),
* if set to "y", MIDAS history logging is active; [[mlogger]] will write data into this channel.
* if set to "y", MIDAS-history logging is active; [[mlogger]] will write data into this channel.
* if set to "n" to  MIDAS history logging is disabled.
* if set to "n" to  MIDAS-history logging is disabled.


<br>
<br>
Line 110: Line 111:


This key controls the debug level.
This key controls the debug level.
If set to 0, debug is disabled for this history logging channel.
If set to 0, debug is disabled for this <''history-logging-channel''>.


<br>
<br>
Line 126: Line 127:
This key is present in a history channel of Type "MIDAS" only (see  [[#/Logger/History/0/Type|Type key]]).  
This key is present in a history channel of Type "MIDAS" only (see  [[#/Logger/History/0/Type|Type key]]).  


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:
* there is one history record for each equipment
* there is one history record for each equipment
* history record id is equal to the equipment id
* history record id is equal to the equipment id
Line 242: Line 243:
</div>  
</div>  


This key specifies the type of history logging for this ''history-logging-channel''.  
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.
[[mlogger]] creates this channel with this key set to "SQLITE" since this subtree  <span style="color: purple;">''2''</span>  controls SQLITE history logging.

Revision as of 14:58, 18 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 creates three /Logger/History ODB subtrees 0,1 and 2 as shown in the following example:

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

The three subtrees are each a <history-logging-channel> created to control one of the three history drivers available, i.e. MIDAS, ODBC and SQLITE.

Each subdirectory is created with a different value in the subkey "Type", i.e.

  • Subtree 0 for MIDAS-history (key Type set to "MIDAS")
  • Subtree 1 for ODBC-history (key Type set to "ODBC")
  • Subtree 2 for SQLITE-history (key Type set to "SQLITE")


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



/Logger/History/0/ subtree

By default, this subtree (<history-logging-channel> = "0") controls history logging of events using the MIDAS-history driver.




/Logger/History/0/Type

  • Type: STRING
  • Default: MIDAS

This key specifies the type of history logging for this <history-logging-channel>.

mlogger creates this channel with this key set to "MIDAS" since by default this subtree, i.e. (<history-logging-channel> = "0"), controls MIDAS-history logging.





/Logger/History/0/Active

  • Type: BOOL
  • Default: "y"

Since this subtree, i.e. (<history-logging-channel> = "0") by default controls MIDAS-history logging (see Type),

  • if set to "y", MIDAS-history logging is active; mlogger will write data into this channel.
  • if set to "n" to MIDAS-history logging is disabled.


Note:this key replaces obsolete key /Logger/WriteFileHistory





/Logger/History/0/Debug

  • Type: INT
  • Default: 0

This key controls the debug level. If set to 0, debug is disabled for this <history-logging-channel>.





/Logger/History/0/PerVariableHistory

  • Type: INT
  • Default: 0

This key is present in a history channel of Type "MIDAS" only (see Type key).

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







/Logger/History/1/ subtree

By default, this subtree controls history logging of ODBC.


/Logger/History/1/Type

  • Type: STRING
  • Default: "ODBC"

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 1 controls ODBC history logging.





/Logger/History/1/Active

  • Type: BOOL
  • Default: "n"

If set to "y", ODBC history logging is active. ODBC data are written into this channel. See also Type key.


/Logger/History/1/Debug

  • Type: INT
  • Default: 0

This key holds the debug level for this channel. If set to 0, debug is disabled for ODBC history logging.

See also Type key.


Note: this key replaces obsolete key /Logger/ODBC_Debug



/Logger/History/1/Writer_ODBC_DSN

  • Type: STRING
  • Default: "history_writer"

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 Type key.

Note: this key replaces obsolete key /Logger/ODBC DSN



/Logger/History/1/Reader_ODBC_DSN

  • Type: STRING
  • Default: "history_reader"

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.

See also Type key.

Note: this key replaces obsolete key /history/ODB_DSN







/Logger/History/2/ subtree

This subtree controls history logging of SQLITE


/Logger/History/2/Type

  • Type: STRING
  • Default: "SQLITE"

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 2 controls SQLITE history logging.




/Logger/History/2/Active

  • Type: BOOL
  • Default: "n"

If set to "y", SQLITE history logging is active.

See also Type key.


/Logger/History/2/Debug

  • Type: INT
  • Default: 0

This key contains the debug level for this channel. If set to 0, debug is disabled for SQLITE history logging.

See also Type key.






/Logger/History/2/Sqlite dir

  • Type: STRING
  • Default:

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

This key is present in a history channel of Type "SQLITE" only, and is created by mlogger.

See also Type key.