Linux comandos Ping, Traceroute e MTR
Autor: Elviro Ferraz | Publicado: 2016-05-01T14:12:00-03:00



&nbsp;&nbsp; Comandos Ping Traceroute e Mtr no Linux&nbsp;

&nbsp;O Mtr é uma ferramenta de diagnóstico de rede combina as funcionalidades dos comandos ping e traceroute .
&nbsp; Ao iniciar, o mtr investiga a conexão de rede entre o computador local, em que ele está sendo executado (host) e o outro, indicado pelo usuário (hostname) — enviando pacotes com TTLs propositadamente baixos. Ele envia os pacotes continuamente e registra os tempos de resposta dos roteadores intervenientes.&nbsp;

&nbsp;O Mtr trabalha enviando pacotes ICMP e incrementa o valor do TTL até 
encontrar uma rota entre a fonte (onde ele é executado) e o destino.
O significado de MTR é My TraceRoute, ou meu traceroute.
Ao combinar o uso do ping com o traceroute, se torna uma ferramenta poderosa para diagnosticar a sua rede.

&nbsp;mtr --curses uol.com.br&nbsp;
Este comando irá executar o aplicativo no modo texto, como você pode ver na imagem, abaixo:

Start: Sun May&nbsp; 1 12:34:02 2016HOST: IdeaPad-Y430&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; Loss%&nbsp; Snt&nbsp;&nbsp; Last&nbsp;&nbsp; Avg&nbsp; Best&nbsp; Wrst&nbsp;&nbsp; StDev&nbsp; 1.|-- 192.168.1.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; 0.0%&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp; 3.1&nbsp;&nbsp; 3.4 &nbsp; &nbsp; 2.4 &nbsp; &nbsp; 6.3&nbsp;&nbsp;&nbsp; 0.9&nbsp; 2.|-- 189.40.251.175&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0%&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0%&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp; 12.4&nbsp; 12.6&nbsp; 11.8&nbsp; 13.3&nbsp;&nbsp;&nbsp; 0.0&nbsp; 9.|-- 209.85.245.51&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 0.0%&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp; 19.9&nbsp; 20.4&nbsp; 19.7&nbsp; 22.5&nbsp; &nbsp; 0.7&nbsp;10.|-- 216.58.215.25&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0%&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp; 28.9&nbsp; 29.7&nbsp; 27.1&nbsp; 33.7&nbsp;&nbsp;&nbsp; 1.6&nbsp;11.|-- 216.58.222.67&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0%&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp; 28.9&nbsp; 29.4&nbsp; 28.6&nbsp; 31.3&nbsp;&nbsp;&nbsp; 0.6
--------------------------------------------------------------------------------------------------------------

Entenda a saída do comando Mtr
Segue o significado de cada coluna no relatório visto:


Loss% — mostra a perda, em percentual, dos pacotes, a cada ciclo
Snt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; — exibe o número de pacotes enviados (sent)
Last&nbsp;&nbsp;&nbsp; — latência do último (last) pacote enviado
Avg&nbsp;&nbsp;&nbsp;&nbsp; — latência média (average) de todos os pacotes
Best&nbsp;&nbsp;&nbsp; — mostra o tempo de viagem (Round Trip Time) mais curto da origem ao destino
Wrst — mostra o pior tempo de viagem da origem ao destino (worst RTT)
StDev — provê o desvio padrão (Standard Deviation) das latências para cada host























&nbsp;root@IdeaPad-Y430:/home/ideaPad# mtr --no-dns --report ige.com.brStart: Sun May&nbsp; 1 13:01:40 2016HOST:IdeaPad-Y430&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; Loss%&nbsp;&nbsp;&nbsp; Snt&nbsp;&nbsp; &nbsp; Last&nbsp; &nbsp;&nbsp; Avg&nbsp; &nbsp; &nbsp; Best&nbsp;&nbsp;&nbsp;&nbsp; Wrst&nbsp; StDev&nbsp; 1.|-- 192.168.1.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 0.0%&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; 6.9&nbsp; &nbsp; &nbsp; &nbsp; 4.5&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 3.1&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 7.9&nbsp;&nbsp;&nbsp; 1.7&nbsp; 2.|-- 189.40.251.175&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 0.0%&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; 9.3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15.5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8.9 &nbsp; &nbsp; &nbsp; 35.8&nbsp; &nbsp; 9.1&nbsp; 3.|-- 10.216.250.101&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 0.0%&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp;&n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p; 240.8&nbsp;&nbsp;&nbsp; 247.2&nbsp;&nbsp; 236.7&nbsp;&nbsp;&nbsp;&nbsp; 318.6&nbsp; 25.1&nbsp;14.|-- ???&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100.0&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0&nbsp; &nbsp; &nbsp; &nbsp; 0.0&nbsp; &nbsp; &nbsp; &nbsp; 0.0&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 0.0&nbsp; &nbsp; 0.0
------------------------------------------------------------------------------------------------------------------
Uma boa dica, aqui, é prestar atenção no StDev, mesmo que o Avg pareça bom.
Os indicadores, como qualquer estatística, só funcionam se estiverem “entrelaçados”.
Um StDev alto é indício de que o Avg está distorcido por alguns erros de
 medição ou por excesso de flutuação. Neste caso, observe as colunas 
Best e Wrst para se certificar de que a média está boa.