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

Report secondary servers when CSV + wide report is enabled #416

Closed gmax0 closed 2 years ago

gmax0 commented 2 years ago

Re-used most of the logic already defined in report_close.

Might be worthwhile to add another option? Currently, so long as --csv comes after --report-wide, the following will print:

./mtr ft.com -4 -T -n --report-cycles 5 --report-wide --csv

Mtr_Version,Start_Time,Status,Host,Hop,Ip,Loss%,Snt, ,Last,Avg,Best,Wrst,StDev,
MTR.0.94,1639463558,OK,ft.com,1,???,0.00,5,0,0.70,0.98,0.70,1.75,0.45
MTR.0.94,1639463558,OK,ft.com,2,???,0.00,5,0,9.82,10.60,9.45,12.03,1.06
MTR.0.94,1639463558,OK,ft.com,3,???,100.00,5,5,0.00,0.00,0.00,0.00,0.00
MTR.0.94,1639463558,OK,ft.com,4,72.129.2.22,0.00,5,0,30.57,30.80,10.70,78.62,27.69
MTR.0.94,1639463558,OK,ft.com,5,72.129.1.0,0.00,5,0,13.30,14.65,13.30,18.19,2.05
MTR.0.94,1639463558,OK,ft.com,6,66.109.6.92,0.00,5,0,18.66,16.32,12.97,18.66,2.49
MTR.0.94,1639463558,OK,ft.com,6,209.18.43.62,0.00,5,0,18.66,16.32,12.97,18.66,2.49
MTR.0.94,1639463558,OK,ft.com,6,66.109.3.230,0.00,5,0,18.66,16.32,12.97,18.66,2.49
MTR.0.94,1639463558,OK,ft.com,7,66.109.7.225,0.00,5,0,14.60,15.94,14.00,19.01,2.10
MTR.0.94,1639463558,OK,ft.com,7,66.109.5.123,0.00,5,0,14.60,15.94,14.00,19.01,2.10
MTR.0.94,1639463558,OK,ft.com,8,23.235.41.12,0.00,5,0,14.14,17.83,14.14,28.25,5.89
MTR.0.94,1639463558,OK,ft.com,9,151.101.130.209,0.00,5,0,15.27,15.71,15.10,17.34,0.92