Test de velocidad con CLI (Linux) speedtest-cli
Que es speedtest-cli
Speedtest-cli es una aplicación hecha en python que nos permite realizar un test de velocidad desde una consola de comandos (CLI). Útil cuando no tenemos un navegador, o simplemente no tenemos instalada la interfaz gráfica.
Thank you for reading this post, don't forget to subscribe!
Como instalarlo:
1.- Instalar speedtest-cli usando pip :
$ sudo apt-get install python-pip $ sudo pip install speedtest-cli
2.- Instalar speedtest-cli (sistema manual):
$ sudo wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py $ sudo chmod a+rx speedtest_cli.py $ sudo mv speedtest_cli.py /usr/bin/speedtest-cli
Test Connection Speed Speedtest-cli:
$ speedtest-cli
Automáticamente encuentra el servidor mas cercano para la prueba de velocidad.
$ speedtest-cli Retrieving speedtest.net configuration... Testing from Masmovil (94.73.32.4)... Retrieving speedtest.net server list... Selecting best server based on ping... Hosted by Anxanet (Vilanova i la Geltrú) [464.67 km]: 37.927 ms Testing download speed................................................................................ Download: 20.71 Mbit/s Testing upload speed...................................................................................................... Upload: 11.41 Mbit/s
Puedes listar los servidores de speedtest.net disponibles en el mundo utilizando la opción «–list». Se muestra una lista ordenada segun cercanía geográfica.
$ speedtest-cli --list Retrieving speedtest.net configuration... 20416) Anxanet (Vilanova i la Geltrú, Spain) [464.67 km] 21318) everyWAN (Manresa, Spain) [485.16 km] 46918) Xarxa de Nova Generacio de Navas Sl (Navàs, Spain) [494.66 km] 2254) CSUC (Barcelona, Spain) [504.33 km] 49934) eTelecom (Barcelona, Spain) [504.33 km] 15199) Meswifi (Barcelona, Spain) [504.33 km] 11015) apfutura (Centelles, Spain) [518.75 km] 5075) Aeris Navigo (Girona, Spain) [572.07 km] 37419) Inforcelra S.L.U. (Celrà, Spain) [577.96 km] 23766) GhoFi (Sant Antoni de Calonge, Spain) [590.51 km]
En la lista de servidores, cada servidor muestra un ID asociado. Este ID se puede utilizar para especificar contra que servidor quieres realizar la prueba.
$ speedtest-cli --server 20416
Tiene algunas opciones mas, puedes consultarlas con:
$ speedtest-cli --help Command line interface for testing internet bandwidth using speedtest.net. -------------------------------------------------------------------------- https://github.com/sivel/speedtest-cli optional arguments: -h, --help show this help message and exit --no-download Do not perform download test --no-upload Do not perform upload test --single Only use a single connection instead of multiple. This simulates a typical file transfer. --bytes Display values in bytes instead of bits. Does not affect the image generated by --share, nor output from --json or --csv --share Generate and provide a URL to the speedtest.net share results image, not displayed with --csv --simple Suppress verbose output, only show basic information --csv Suppress verbose output, only show basic information in CSV format. Speeds listed in bit/s and not affected by --bytes --csv-delimiter CSV_DELIMITER Single character delimiter to use in CSV output. Default "," --csv-header Print CSV headers --json Suppress verbose output, only show basic information in JSON format. Speeds listed in bit/s and not affected by --bytes --list Display a list of speedtest.net servers sorted by distance --server SERVER Specify a server ID to test against. Can be supplied multiple times --exclude EXCLUDE Exclude a server from selection. Can be supplied multiple times --mini MINI URL of the Speedtest Mini server --source SOURCE Source IP address to bind to --timeout TIMEOUT HTTP timeout in seconds. Default 10 --secure Use HTTPS instead of HTTP when communicating with speedtest.net operated servers --no-pre-allocate Do not pre allocate upload data. Pre allocation is enabled by default to improve upload performance. To support systems with insufficient memory, use this option to avoid a MemoryError --version Show the version number and exit $ man speedtest-cli (ver página man) OPTIONS Usage: speedtest-cli [OPTION...] Help Options -h, --help Displays usage for the tool. Options --no-download Do not perform download test --no-upload Do not perform upload test --single Only use a single connection instead of multiple. This simulates a typical file transfer. --bytes Display values in bytes instead of bits. Does not affect the image generated by --share, nor output from --json or --csv --share Generate and provide a URL to the speedtest.net share results image, not displayed with --csv --simple Suppress verbose output, only show basic information --csv Suppress verbose output, only show basic information in CSV format. Speeds listed in bit/s and not affected by --bytes --csv-delimiter CSV_DELIMITER Single character delimiter to use in CSV output. Default "," --csv-header Print CSV headers --json Suppress verbose output, only show basic information in JSON format. Speeds listed in bit/s and not affected by --bytes --list Display a list of speedtest.net servers sorted by distance --server SERVER Specify a server ID to test against. Can be supplied multiple times --exclude EXCLUDE Exclude a server from selection. Can be supplied multiple times --mini MINI URL of the Speedtest Mini server --source SOURCE Source IP address to bind to --timeout TIMEOUT HTTP timeout in seconds. Default 10 --secure Use HTTPS instead of HTTP when communicating with speedtest.net operated servers --no-pre-allocate Do not pre allocate upload data. Pre allocation is enabled by default to improve upload performance. To support systems with insufficient memory, use this option to avoid a MemoryError --version Show the version number and exit EXAMPLES Automatically find closest server and start testing speedtest-cli Specify testing against server 1491 speedtest-cli --server 1491 Testing against Speedtest Mini speedtest-cli --mini 172.18.66.1
Comparte tu experiencia de uso¡¡¡¡