LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-01-2020, 03:09 AM   #1
licsuc_vs
LQ Newbie
 
Registered: Sep 2020
Posts: 6

Rep: Reputation: Disabled
MTR [Ubuntu 18.04] vs MTR-Tiny[Ubuntu 16.04] CSV output


So my goal here is to monitor connection to some IPs using MTR command and using telegraf, will display graphs/tables to grafana.

Telegraf requires the MTR output to be in CSV format. I noticed that there is a difference in output between MTR on Ubuntu 18.04 and MTR-Tiny on Ubuntu 16.04.

Examples below:
MTR-TINY 0.84 on Ubuntu 16.04
Code:
root@mtr:~# mtr -C 8.8.8.8
MTR.0.86;1601535913;OK;8.8.8.8;1;ubuntu181-Virtual-Machine;53
MTR.0.86;1601535913;OK;8.8.8.8;2;IP2;254
MTR.0.86;1601535913;OK;8.8.8.8;3;???;0

MTR 0.92 on Ubuntu 18.04
Code:
Mtr_Version,Start_Time,Status,Host,Hop,Ip,Loss%,Snt, ,Last,Avg,Best,Wrst,StDev,
MTR.0.92,1601536032,OK,8.8.8.8,1,ubuntu181-Virtual-Machine,30.00,10,3,0.13,0.08,0.05,0.13,0.04
MTR.0.92,1601536032,OK,8.8.8.8,2,IP2,0.00,10,0,0.62,0.51,0.30,0.87,0.19
MTR.0.92,1601536032,OK,8.8.8.8,3,???,100.00,10,10,0.00,0.00,0.00,0.00,0.00
MTR.0.92,1601536032,OK,8.8.8.8,4,dns.google,100.00,10,10,0.00,0.00,0.00,0.00,0.00

My question here is if anyone knows that last column output of MTR-Tiny represents? since no headers area displayed.

Or I would appreciate if anyone has suggestions how this can be achieved away from telegraf CSV output to grafana.


Thanks
 
Old 10-02-2020, 11:49 AM   #2
boughtonp
Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 955

Rep: Reputation: 735Reputation: 735Reputation: 735Reputation: 735Reputation: 735Reputation: 735Reputation: 735
Quote:
Originally Posted by licsuc_vs View Post
My question here is if anyone knows that last column output of MTR-Tiny represents? since no headers area displayed.
Does it not tell you what the columns are if you do "mtr --help" or "man mtr" ?

 
Old 10-05-2020, 02:40 AM   #3
licsuc_vs
LQ Newbie
 
Registered: Sep 2020
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by boughtonp View Post
Does it not tell you what the columns are if you do "mtr --help" or "man mtr" ?


No they do not show what the columns for CSV output are.
 
Old 10-05-2020, 08:11 AM   #4
boughtonp
Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 955

Rep: Reputation: 735Reputation: 735Reputation: 735Reputation: 735Reputation: 735Reputation: 735Reputation: 735
Quote:
Originally Posted by licsuc_vs View Post
No they do not show what the columns for CSV output are.
According to its debian packages page, mtr-tiny is simply mtr compiled without support for X.

Thus the issue tracker, where you need to report the documentation flaw as a bug, is here: https://github.com/traviscross/mtr/issues

update: Except I just noticed, your examples are from different versions and - since the newer one has headers - this means it has already been resolved. A quick search of the repo reveals this commit which appears to show that the final column was "last".

I still don't think the new columns names are particularly great, but at least they're there.


Last edited by boughtonp; 10-05-2020 at 08:20 AM.
 
Old 10-05-2020, 10:08 AM   #5
licsuc_vs
LQ Newbie
 
Registered: Sep 2020
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by boughtonp View Post

I still don't think the new columns names are particularly great, but at least they're there.
Took a look at the fix issue you found, however it seems that's not for mtr-tiny.
MTR-tiny output is still witout column names.

I ran an MTR command from separate nodes [ same subnet ] towards 8.8.8.8, one with MTR v.092 and one with MTR v.086 and the LAST values aren't similar.
 
Old 10-05-2020, 01:12 PM   #6
boughtonp
Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 955

Rep: Reputation: 735Reputation: 735Reputation: 735Reputation: 735Reputation: 735Reputation: 735Reputation: 735

Hrm, I just installed it to have a look, and on Debian Buster with mtr-tiny 0.92-2 running either "mtr -C 8.8.8.8" or "mtr --csv ddg.gg" just sits there outputting nothing until I Ctrl-C.

Same deal for json/xml options - no output. The --raw option does output stuff, and not specifying anything appears to default to the --curses interface.

*shrug*

Dunno what's up with that, but if the data you're getting doesn't resemble LAST and still doesn't have headers then I revert to suggesting you raise a bug.

 
Old 10-19-2020, 02:58 AM   #7
licsuc_vs
LQ Newbie
 
Registered: Sep 2020
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by boughtonp View Post
Hrm, I just installed it to have a look, and on Debian Buster with mtr-tiny 0.92-2 running either "mtr -C 8.8.8.8" or "mtr --csv ddg.gg" just sits there outputting nothing until I Ctrl-C.

Same deal for json/xml options - no output. The --raw option does output stuff, and not specifying anything appears to default to the --curses interface.

*shrug*

Dunno what's up with that, but if the data you're getting doesn't resemble LAST and still doesn't have headers then I revert to suggesting you raise a bug.


I managed to find a way to upgrade MTR version on Ubuntu 16.04 from 0.84 to 0.92.
With v0.92, all the required columns are listed.

From another post online:

1) apt install autoconf pkgconf automake make
2) git clone https://github.com/traviscross/mtr.git
3) cd mtr/
4) ./bootstrap.sh && ./configure && make
5) cp mtr* /usr/bin/
6) mtr --v to confirm
 
Old 10-25-2020, 04:13 PM   #8
computersavvy
Member
 
Registered: Aug 2016
Posts: 662

Rep: Reputation: 210Reputation: 210Reputation: 210
According to the man page for mtr you can use the -o option to tell it which fields to display and in what order so you only see the data you wish. I am using 0.92
 
Old 10-28-2020, 11:26 AM   #9
licsuc_vs
LQ Newbie
 
Registered: Sep 2020
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by computersavvy View Post
According to the man page for mtr you can use the -o option to tell it which fields to display and in what order so you only see the data you wish. I am using 0.92
Yes on MTR 0.92 that's available however not on MTR 0.84
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to print lines in csv file if 1 csv column field = "text". There are 10 column (;) in csv file nexuslinux Linux - Newbie 9 04-23-2016 12:35 AM
Can anything format mtr output for ongoing details? mlewis Linux - Networking 2 05-16-2014 12:43 AM
I don't understand the mtr (my traceroute) output Durham Linux - Networking 3 05-07-2008 03:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration