Hs config

From MidasWiki
Jump to navigation Jump to search


New history configuration defines history channels similar to logger channels. Each history channel creates a history interface class (class MidasHistoryInterface). The mlogger can use this interface to write data into the history, mhttpd, mhist & co can use this interface to read data from the history. The interface is defined in history.h

History drivers

The MIDAS distribution contains these drivers. More drivers can be easily added by the user (create history_xxx.cxx, add constructor to hs_get_histrory(), create the ODB /Logger/History/x/channel).

  • "MIDAS" is the traditional MIDAS history, data is stored in the .hst binary files. (format is documented here mhformat, see also mhist and mhdump)
  • "ODBC" stores history data in SQL database using the ODBC abstraction layer. MySQL is fully supported, Pgsql support is partially implemented, support for arbitrary ODBC driver is easy to add.
  • "SQLITE" stores data in SQLITE3 .sqlite3 files. The SQL table format is similar to ODBC history, performance is similar, no database server required.

ODB tree

  • /Logger/
    • History/0/ --- history channel 0 (by default: "MIDAS")
      • Type --- driver type ("MIDAS")
      • Active --- y/n --- tells mlogger to write data into this channel
      • Debug --- debug level
      • PerVariableHistory --- tells mlogger to enable the Per-variable history logging mode
    • History/1/ --- history channel 1 (by default: "ODBC")
      • Type --- driver type ("ODBC")