Mhist: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
(Created page with "== Description == The <span style="color:darkcyan;">''mhist''</span> utility dumps data from the History system. You specify which events/tags you're intere...")
 
(The midas documentation has moved to https://midas.triumf.ca/docs/)
 
Line 1: Line 1:
== Description ==
The midas documentation has moved. See [https://midas.triumf.ca/docs/develop/reference/reference/programs/#mhist mhist] on the Programs and options page and [https://midas.triumf.ca/docs/develop/features/storing_data/history/#command-line-query-mhist Command-line query (mhist)] on the History: overview page for the new documentation about the mhist program.
The <span style="color:darkcyan;">''mhist''</span> utility dumps data from the [[History_System|History system]]. You specify which events/tags you're interested in and the time period to query, and the results will be printed to screen.
 
== Arguments ==
If no arguments are provided, an interactive session will be started that will prompt the user to answer questions about which data should be dumped. The questions are the equivalent of the -e, -v, -h and -t arguments (i.e. show data for the most recent N hours for a single event/variable).
 
[-e Event Name]
[-v Variable Name]
[-i Index] index of variables which are arrays
[-i Index1:Index2] index range of variables which are arrays (max 50)
[-t Interval] minimum interval in sec. between two displayed records
[-h Hours] display between some hours ago and now
[-d Days] display between some days ago and now
[-f File] specify history file explicitly
[-s Start date] specify start date YYMMDD[.HHMM[SS]]
[-p End date] specify end date YYMMDD[.HHMM[SS]]
[-l] list available events and variables
[-b] display time stamp in decimal format
 
== Examples ==
To enter an interactive session:  
  mhist
To list all existing events and variables:
  mhist -l
To show data for all variables in event "ExampleEvent" for the last 10 days, with at most one datapoint per minute:
  mhist -e ExampleEvent -d 10 -t 60
Same as before, but show timestamps as integers (UNIX timestamps) rather than strings like "Mar 30 14:16:14":
  mhist -e ExampleEvent -d 10 -t 60 -b
 
== Notes ==
The mhist source code can be found in the Midas package under ../midas/progs.
 
 
[[Category:Utilities]] [[Category:History]]

Latest revision as of 22:01, 30 October 2026

The midas documentation has moved. See mhist on the Programs and options page and Command-line query (mhist) on the History: overview page for the new documentation about the mhist program.