首先确保自己服务器有python环境
然后再执行下面命令

curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -