-
Thomas Bellman authored
This adds a new choice "columns" to the mbtcpget --format option, causing mbtcpget to output the measurements in one column per metric. Eac columns gets a heading with device name, register name, and unit. A new set of headings are output as the screen fills (if the standard output is a terminal), so you will always have exactly one set of headings visible. This format is optimized for fitting as many metrics as reasonably possible per screen line. Thus, timestamps are limited to time only, and units are only shown in the column headings. Some effort is spent to try to ensure columns stay aligned, even if values change in width. The output formatter tracks the widest value seen so far for each column, and aligns subsequent values to that. (This can give suboptimal results if you only occasionally get a very wide value, as that will cause that column to get stuck at that wide width. Perhaps we should reset the widths when a new set of headings are output?)
Thomas Bellman authoredThis adds a new choice "columns" to the mbtcpget --format option, causing mbtcpget to output the measurements in one column per metric. Eac columns gets a heading with device name, register name, and unit. A new set of headings are output as the screen fills (if the standard output is a terminal), so you will always have exactly one set of headings visible. This format is optimized for fitting as many metrics as reasonably possible per screen line. Thus, timestamps are limited to time only, and units are only shown in the column headings. Some effort is spent to try to ensure columns stay aligned, even if values change in width. The output formatter tracks the widest value seen so far for each column, and aligns subsequent values to that. (This can give suboptimal results if you only occasionally get a very wide value, as that will cause that column to get stuck at that wide width. Perhaps we should reset the widths when a new set of headings are output?)
Loading