Mhdump: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
(Created page with "== Description == The <span style="color:darkcyan;">''mhdump''</span> utility dumps history files. <span style="color:darkcyan;">''mhdump''</span> is intended to be easier to...")
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
== Description ==
== Description ==
The <span style="color:darkcyan;">''mhdump''</span> utility dumps history files.
The <span style="color:darkcyan;">''mhdump''</span> utility dumps history files. It is only useful if the [[History_System|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.


<span style="color:darkcyan;">''mhdump''</span> is intended to be easier to use, compared to [[mhist]]. By default it 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.
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.
 
<span style="color:darkcyan;">''mhdump''</span> 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.  


<span style="color:darkcyan;">''mhdump''</span> is completely standalone and does not require MIDAS header files and libraries.
<span style="color:darkcyan;">''mhdump''</span> is completely standalone and does not require MIDAS header files and libraries.
Line 32: Line 34:




[[Category:Utilities]]
[[Category:Utilities]] [[Category:History]]

Latest revision as of 16:11, 3 August 2023

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.