traviscross / mtr

Official repository for mtr, a network diagnostic tool
http://www.bitwizard.nl/mtr/
GNU General Public License v2.0
2.64k stars 337 forks source link

Omit the program version from the CSV output #453

Closed elfring closed 1 year ago

elfring commented 1 year ago

I took another look at the evolving network analysis tool according to the development revision “v0.95-17-g826ffa9”. I noticed then that the field “Mtr_Version” is exported into CSV files by the implementation of the function “csv_close” so far. I would usually not need such an information in this file format. Can it be omitted? :thinking:

rewolff commented 1 year ago

The idea is that the program processing that, might adjust according to the version. Suppose the format changes a bit between version 0.96 and 0.97? And that these reports are generated on different machines around an installation where some are running 0.96 and some are running 0.97. Removing it in post-processing is much easier than adding it afterwards. That's why it remains in.

elfring commented 1 year ago

The program version can be a helpful information for a selected data export. I suggest to reconsider it a bit more if this detail needs to be stored with every line (or record set). 💭 Can the field “Mtr_Version” become optional for CSV files?

rewolff commented 1 year ago

To do this: use the mechanism in place for the fields-to-show. Adjust the default for "report" such that it remains compatible with older versions.

elfring commented 1 year ago

💭 I got the impression that the field “Mtr_Version” would be exported by default into CSV files as the first field. Can it be really excluded for a smaller data output?

elfring commented 1 year ago

… use the mechanism in place for the fields-to-show …

How does the following test result fit to your suggestion?

…:…/Bau/mtr/console # ./mtr -c 2 --csv --order 'S L' localhost
Mtr_Version,Start_Time,Status,Host,Hop,Ip,Snt, ,Loss%,
…

Would you like to help a bit more with the clarification of corresponding implementation details? :thinking: