Velocidade de Internet – Modo Shell

Tecnologia infraestrutura e desenvolvimento

Velocidade de Internet – Modo Shell

Para Ubuntu, Debian digite:

# sudo apt-get install python-lxml

Para Fedora e Red Hat digite:

# sudo yum install python-lxml

Fala Galera tudo sussa??

Testando velocidade da conexão pelo terminal

Você está acessando um servidor remoto por ssh e quer saber se a conexão está boa? Não dá pra acessar nenhum site de teste de velocidade porque está acessando pelo modo texto?

Vou demosntrar alguns comando que vc pode testar via shell a vazão de um link

Primeiro exemplo

# curl -o /dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0  500M    0  362k    0     0  46969      0  3:06:02  0:00:07  3:05:55 44550
  0  500M    0  397k    0     0  42180      0  3:27:09  0:00:09  3:27:00 33353
  0  500M    0  427k    0     0  40979      0  3:33:14  0:00:10  3:33:04 28132
  0  500M    0  538k    0     0  37338      0  3:54:01  0:00:14  3:53:47 28191

Segundo exemplo

aria2c http://downloads.ipfire.org/releases/ipfire-2.x/2.13-core72/ipfire-2.13.i586-full-core72.iso
 *** Download Progress Summary as of Tue Nov 12 08:28:53 2013 ***                                                                              
===============================================================================================================================================
[#d6484c 89MiB/102MiB(87%) CN:1 DL:1.5MiB ETA:7s]
FILE: /tmp/ipfire-2.13.i586-full-core72.iso
———————————————————————————————————————————————–

[#d6484c 101MiB/102MiB(99%) CN:1 DL:1.8MiB]                                                                                                    
11/12 08:29:00 [NOTICE] Download Completo: /tmp/ipfire-2.13.i586-full-core72.iso

Resultados do Download:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
d6484c|OK  |   1.5MiB/s|/tmp/ipfire-2.13.i586-full-core72.iso

Legenda de estados:
(OK):download completo.

Terceiro exemplo

# git clone git://github.com/Janhouse/tespeed.git
Cloning into ‘tespeed’…
remote: Counting objects: 132, done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 132 (delta 72), reused 113 (delta 54)
Receiving objects: 100% (132/132), 85.20 KiB | 0 bytes/s, done.
Resolving deltas: 100% (72/72), done.
Checking connectivity… done

# cd tespeed

# git submodule init
Submódulo ‘SocksiPy’ (git://github.com/Janhouse/SocksiPy.git) registrado para o caminho ‘SocksiPy’

# git submodule update

Cloning into ‘SocksiPy’…
remote: Counting objects: 49, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 49 (delta 23), reused 48 (delta 22)
Receiving objects: 100% (49/49), 17.99 KiB | 0 bytes/s, done.
Resolving deltas: 100% (23/23), done.
Checking connectivity… done
Submodule path ‘SocksiPy’: checked out ‘842d4962cbce16ce4b232d1b7402d0375f9a0c1b’

./tespeed.py
Getting ready. Use parameter -h or –help to see available features.
Loading speedtest configuration…
IP: 189.47.215.182; Lat: -21.166700; Lon: -47.800000; ISP: Vivo
Loading server list…
Looking for closest and best server…
Testing latency…
20 ms latency for http://speedtest.convex.com.br/speedtest/ (Convex Internet Solutions, Ribeirao Preto, Brazil) [1.14 km]
20 ms latency for http://velocidade.insidesign.com.br/speedtest/ (Insidesign Tecnologia em Web, Ribeirao Preto, Brazil) [1.14 km]
42 ms latency for http://velocimetro.ctbc.net.br/speedtest/ (Algar Telecom, Franca, Brazil) [64.68 km]
23 ms latency for http://speedtest.xturbo.com.br/speedtest/ (Xturbo Provedor de Internet Ltda, Araras, Brazil) [100.46 km]
27 ms latency for http://velocidade.onda.net.br/speedtest/ (ONDA INTERNET, Sacramento, Brazil) [103.69 km]
Download size: 1.96 MiB; Downloaded in 0.13 s                                              
Download speed: 14.90 Mbit/s
Download size: 1.96 MiB; Downloaded in 0.11 s                                              
Download speed: 17.92 Mbit/s
Download size: 8.09 MiB; Downloaded in 0.16 s                                              
Download speed: 51.97 Mbit/s
Download size: 8.09 MiB; Downloaded in 0.19 s                                              
Download speed: 43.39 Mbit/s
Download size: 17.89 MiB; Downloaded in 0.57 s                                             
Download speed: 31.31 Mbit/s
Download size: 17.89 MiB; Downloaded in 3.98 s                                             
Download speed: 4.49 Mbit/s
Download size: 31.78 MiB; Downloaded in 0.92 s                                             
Download speed: 34.50 Mbit/s
Download size: 71.49 MiB; Downloaded in 4.67 s                                             
Download speed: 15.31 Mbit/s
Download size: 126.52 MiB; Downloaded in 32.37 s                                           
Download speed: 3.91 Mbit/s
Upload size: 2.10 MiB; Uploaded in 0.28 s                                                  
Upload speed: 7.61 Mbit/s
Upload size: 2.10 MiB; Uploaded in 0.30 s                                                  
Upload speed: 6.99 Mbit/s
Upload size: 8.39 MiB; Uploaded in 0.96 s                                                  
Upload speed: 8.77 Mbit/s
Upload size: 8.39 MiB; Uploaded in 1.71 s                                                  
Upload speed: 4.91 Mbit/s
Upload size: 16.78 MiB; Uploaded in 3.55 s                                                 
Upload speed: 4.73 Mbit/s
Upload size: 16.78 MiB; Uploaded in 3.31 s                                                 
Upload speed: 5.06 Mbit/s
Upload size: 33.55 MiB; Uploaded in 6.96 s                                                 
Upload speed: 4.82 Mbit/s

Quarto exemplo

# echo “scale=2; `curl –progress-bar -w “%{speed_download}” http://speedtest.wdc01.softlayer.com/downloads/test10.zip -o test.zip` / 131072″ | bc | xargs -I {} echo {}Mb/s
######################################################################## 100.0%
1.61Mb/s

Quinto exemplo

# git clone https://github.com/sivel/speedtest-cli

Cloning into ‘speedtest-cli’…
remote: Counting objects: 217, done.
remote: Compressing objects: 100% (141/141), done.
remote: Total 217 (delta 115), reused 172 (delta 75)
Receiving objects: 100% (217/217), 39.43 KiB | 0 bytes/s, done.
Resolving deltas: 100% (115/115), done.
Checking connectivity… done

# cd speedtest-cli

# ./speedtest-cli

Retrieving speedtest.net configuration…
Retrieving speedtest.net server list…
Testing from Vivo (189.XX.XXX.XXX)…
Selecting best server based on ping…
Hosted by Algar Telecom (Franca) [81.23 km]: 35.365 ms
Testing download speed………………………………….
Download: 16.02 Mbit/s
Testing upload speed…………………………………………..
Upload: 5.05 Mbit/s

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *