Mhdump

From MidasWiki
Revision as of 15:11, 3 August 2023 by Bsmith (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description

The mhdump utility dumps history files. It is only useful if the History system is configured to use MIDAS driver (not MYSQL/ODBC etc) and requires you to specify the exact history (.hst) files to look at.

As an alternative, mhist is a slightly higher-level tool that supports more drivers (including MYSQL/ODBC etc) and will automatically find the relevant .hst files for you if you're using the MIDAS driver.

mhdump reads and decodes all the data in the given history (.hst) files, with options to limit the decoding to specified events and tags, and an option to omit the event and tag names from the output.

mhdump is completely standalone and does not require MIDAS header files and libraries.


Arguments

 -h          print this help message
 -t          omit tag definitions
 -n          omit variable names
 -L          list tag definitions only
 -E event_id specify event id
 -T tag_name specify tag 
 -A          do all 


Usage

$ mhdump
$ mhdump [-h] [-L] [-n] [-t] [-E event_id] [-T tag_name] file1.hst file2.hst ...

Examples

  • To list all existing tags: mhdump -L file1.hst file2.hst ...
  • To show data for all events, all tags: mhdump file1.hst file2.hst ...
  • To show all data for event 0: mhdump -E 0 file1.hst file2.hst ...
  • To show data for event 0, tag "State": mhdump -n -E 0 -T State file1.hst file2.hst ...
  • To show data for event 3, tag "MCRT", array index 5: mhdump -n -E 3 -T MCRT[5] file1.hst file2.hst ...

Notes

The mhdump source code can be found in the Midas package under ../midas/utils/ and a description of the .hst file format is can be found under Mhformat.