Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> Python

ทดสอบความเร็วอินเทอร์เน็ตจาก Linux Terminal


ติดตั้ง speedtest-cli สำหรับทดสอบความเร็วบรอดแบนด์จากเทอร์มินัล ต้องมี Python pip ก่อน

1. ติดตั้ง python-pip

$ sudo apt-get install python-pip

2. ติดตั้ง speedtest-cli

$ sudo pip install speedtest-cli

3. รันการทดสอบ

$ speedtest-cli

ตัวอย่างผลลัพธ์

Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Beam Telecom (183.82.104.71)...
Selecting best server based on latency...
Hosted by ACT Fibernet (Hyderabad) [10.33 km]: 2.75 ms
Testing download speed........................................
Download: 23.32 Mbit/s
Testing upload speed..........................................
Upload: 14.30 Mbit/s

4. ตัวเลือกเพิ่มเติม

$ speedtest-cli --help
# แสดงตัวเลือก: --bytes, --share, --simple, --list, --server, --mini, --source, --timeout, --secure, --version

หมายเหตุ: บทความนี้ใช้ pip สำหรับ Python 2 ปัจจุบันควรใช้ pip3 และ Python 3

$ sudo apt install python3-pip
$ pip3 install speedtest-cli
$ speedtest-cli