Linux下使用Speedtest測試網速
阿新 • • 發佈:2018-11-22
Speedtest是用來測試網路效能的開源軟體,在Linux下面安裝Speedtest可以用來測試網路出口的上傳和下載速度,幫助排查網路方面導致的故障。
Speedtest介紹
由於公司幾個專案使用者訪問的時候響應較慢,專案本身沒問題,服務及呼叫的介面返回資訊都比較正常,猜想是網路方面造成的瓶頸,導致使用者請求的時候網路響應堵塞,拉長了響應時間。
Speedtest.net是比較廣泛的用來測試寬頻速度的網站,Speedtest.net的工作原理並不複雜:它在你的瀏覽器中載入JavaScript程式碼並自動檢測離你最近的Speedtest.net伺服器,然後向伺服器傳送HTTP GET and POST請求來測試上行/下行網速。
但在沒有圖形化桌面時(例如,當你通過命令列遠端登陸伺服器或使用沒有圖形介面的作業系統),基於flash、介面友好的Speedtest.net將無法工作。幸運的是,Speedtest.net提供了一個命令列版本——speedtest-cli。下面我將向你演示如何在Linux的命令列中使用speedtest-cli來測試寬頻連線速度。