파이션으로 만들어진 도구로 HTTP GET 및 POST 요청을 전송하여 다운로드/업로드를 측정합니다.
python 2.4-3.4 이상이면 가능
# rpm -qa |grep python
python-2.7.3-13.fc18.x86_64
Install
:: 설치는 파이션 파일하나만 받으면 끝...
# wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
# chmod a+rx speedtest_cli.py
# mv speedtest_cli.py /usr/local/bin/speedtest_cli
# speedtest_cli --help
usage: speedtest_cli [-h] [--bytes] [--share] [--simple] [--list]
[--server SERVER] [--mini MINI] [--source SOURCE]
[--version]
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
--bytes Display values in bytes instead of bits. Does not affect
the image generated by --share
--share Generate and provide a URL to the speedtest.net share
results image
--simple Suppress verbose output, only show basic information
--list Display a list of speedtest.net servers sorted by distance
--server SERVER Specify a server ID to test against
--mini MINI URL of the Speedtest Mini server
--source SOURCE Source IP address to bind to
--version Show the version number and exit
# speedtest_cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Smileserv (XXX.XXX.XXX.212)...
Selecting best server based on latency...
Hosted by Ookla (Seoul) [2.30 km]: 16.843 ms
Testing download speed........................................
Download: 304.80 Mbits/s
Testing upload speed..................................................
Upload: 98.71 Mbits/s
테스트결과를 png 파일로 저장해서 공유할경우 --share 옵션을 사용하게 되면 웹에서도 확인가능
# speedtest_cli --share
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Smileserv (XXX.XXX.XXX.212)...
Selecting best server based on latency...
Hosted by Ookla (Seoul) [2.30 km]: 25.379 ms
Testing download speed........................................
Download: 184.62 Mbits/s
Testing upload speed..................................................
Upload: 260.26 Mbits/s
Share results: http://www.speedtest.net/result/3869742539.png
Share results 결과링크로 들어가면 아래처럼 확인가능합니다.
다른나라와의 속도를 체크하기 위해서는 speedtest.net 에서 제공하는 목록확인하고 측정하시면 됩니다.
확인해보면 통신사, 국가, 거리가 나오며 상당히 많은 국가 리스트를 제공합니다.
# speedtest_cli --list |wc -l
3057
# speedtest_cli --list
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
5249) Ookla (Seoul, South Korea) [2.30 km]
5017) China Unicom,Liaoning Branch (Shenyang, China) [533.38 km]
1185) China Unicom,Changchun Branch (Changchun, China) [715.36 km]
4024) Vladlink (Vladivostok, Russian Federation) [746.65 km]
3805) Alyans Telekom (Vladivostok, Russian Federation) [746.65 km]
1903) MTS (Vladivostok, Russian Federation) [746.65 km]
3133) Rostelecom (Vladivostok, Russian Federation) [746.65 km]
5083) Shanghai Branch, China Unicom (Shanghai, China) [868.27 km]
3633) China Telecom (Shanghai, China) [868.27 km]
.....................
.....................
아래 서버 ID 하고의 속도측정
1185) China Unicom,Changchun Branch (Changchun, China) [715.36 km]
# speedtest_cli --server 1185
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Smileserv (XXX.XXX.XXX.212)...
Hosted by China Unicom,Changchun Branch (Changchun) [715.36 km]: 66.118 ms
Testing download speed........................................
Download: 31.41 Mbits/s
Testing upload speed..................................................
Upload: 19.81 Mbits/s
출처: <http://www.chonnom.com/bbs/board.php?bo_table=B19&wr_id=573>
'Linux' 카테고리의 다른 글
Curl 재설치 하기 (0) | 2016.01.10 |
---|---|
centos samba 설치 (1) | 2015.12.15 |
Centos ext4 mount 방법 (0) | 2015.11.10 |
mysql dump import 속도 개선 (1) | 2015.10.30 |
php5.3 source install (php-fpm) (2) | 2015.10.30 |