手動
/data/data/com.termux/files/home/.termux/font.ttf
Termux:Styling を導入すると,画面長押しからのStyle → CHOSE FONT でメニューから選択できる
導入
$ pkg install speedtest-go
$ speedtest-go --help usage: speedtest-go [<flags>] Flags: --help Show context-sensitive help (also try --help-long and --help-man). -l, --list Show available speedtest.net servers. -s, --server=SERVER ... Select server id to speedtest. --saving-mode Using less memory (≒10MB), though low accuracy (especially > 30Mbps). --json Output results in json format --version Show application version.
$ speedtest-go Testing From IP: 132.145.57.39, (Oracle Cloud) [51.5368, -0.6718] Target Server: [40377] 3.65km Maidenhead (United Kingdom) by Iomart Latency: 699.505226ms Download Test: .......................... Upload Test: .................................... Download: 0.73 Mbit/s Upload: 0.46 Mbit/s
jsonだと情報が多い
$ speedtest-go --json | pee cat "jq ." {"timestamp":"2022-08-28 05:43:27.054","user_info":{"IP":"132.145.57.39","Lat":"51.5368","Lon":"-0.6718","Isp":"Oracle Cloud"},"servers":[{"url":"http://dc5speedtest.rapidswitch.com:8080/speedtest/upload.php","lat":"51.5243","lon":"-0.7206","name":"Maidenhead","country":"United Kingdom","sponsor":"Iomart","id":"40377","url_2":"","host":"dc5speedtest.rapidswitch.com.prod.hosts.ooklaserver.net:8080","distance":3.6547379688452883,"latency":558179222,"dl_speed":3.1659602657727954,"ul_speed":0.8138955009497979}]} { "timestamp": "2022-08-28 05:43:27.054", "user_info": { "IP": "132.145.57.39", "Lat": "51.5368", "Lon": "-0.6718", "Isp": "Oracle Cloud" }, "servers": [ { "url": "http://dc5speedtest.rapidswitch.com:8080/speedtest/upload.php", "lat": "51.5243", "lon": "-0.7206", "name": "Maidenhead", "country": "United Kingdom", "sponsor": "Iomart", "id": "40377", "url_2": "", "host": "dc5speedtest.rapidswitch.com.prod.hosts.ooklaserver.net:8080", "distance": 3.6547379688452883, "latency": 558179222, "dl_speed": 3.1659602657727954, "ul_speed": 0.8138955009497979 } ] }
動かなくなった?
$ speedtest-go Warning: Cannot fetch user information. http://www.speedtest.net/speedtest-config.php is temporarily unavailable. panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x5687d8432c] goroutine 1 [running]: main.showUser(0x5687e167f8?) /home/builder/.termux-build/speedtest-go/src/speedtest.go:138 +0x1c main.main() /home/builder/.termux-build/speedtest-go/src/speedtest.go:36 +0xa4
再インストールで治った?( pkg reinstall
では治らなかった )
$ pkg uninstall speedtest-go $ pkg install speedtest-go
以下のエラーが出ることがある?サイド実行したら動いたのでタイミングの問題?
$ speedtest-go Testing From IP: 132.145.57.39, (Oracle Cloud) [51.5368, -0.6718] Target Server: [40377] 3.65km Maidenhead (United Kingdom) by Iomart Latency: 756.975205ms Download Test: ............................................. Upload Test: .........................2022/08/28 05:29:07 Post "http://dc5speedtest.rapidswitch.com:8080/speedtest/upload.php": EOF
speedtest-cliを使ったほうがいいかもしれない(公式のSpeedtest.netのspeedtest CLIは動作しなかった)
$ curl -Lo ./speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py $ chmod u+x ./speedtest-cli $ ./speedtest-cli Retrieving speedtest.net configuration... Testing from Oracle Cloud (132.145.57.39)... Retrieving speedtest.net server list... Selecting best server based on ping... Hosted by Zen Internet (London) [39.19 km]: 391.727 ms Testing download speed................................................................................ Download: 5.57 Mbit/s Testing upload speed...................................................................................................... Upload: 1.62 Mbit/s $ ./speedtest-cli --json | pee cat "jq ." {"download": 2568796.018459016, "upload": 1429921.2087413822, "ping": 446.731, "server": {"url": "http://speedtest02a.web.zen.net.uk:8080/speedtest/upload.php", "lat": "51.5171", "lon": "-0.1062", "name": "London", "country": "United Kingdom", "cc": "GB", "sponsor": "Zen Internet", "id": "40788", "host": "speedtest02a.web.zen.net.uk:8080", "d": 39.18911319606273, "latency": 446.731}, "timestamp": "2022-08-28T06:41:31.065296Z", "bytes_sent": 3497984, "bytes_received": 3346992, "share": null, "client": {"ip": "132.145.57.39", "lat": "51.5368", "lon": "-0.6718", "isp": "Oracle Cloud", "isprating": "3.7", "rating": "0", "ispdlavg": "0", "ispulavg": "0", "loggedin": "0", "country": "GB"}} { "download": 2568796.018459016, "upload": 1429921.2087413822, "ping": 446.731, "server": { "url": "http://speedtest02a.web.zen.net.uk:8080/speedtest/upload.php", "lat": "51.5171", "lon": "-0.1062", "name": "London", "country": "United Kingdom", "cc": "GB", "sponsor": "Zen Internet", "id": "40788", "host": "speedtest02a.web.zen.net.uk:8080", "d": 39.18911319606273, "latency": 446.731 }, "timestamp": "2022-08-28T06:41:31.065296Z", "bytes_sent": 3497984, "bytes_received": 3346992, "share": null, "client": { "ip": "132.145.57.39", "lat": "51.5368", "lon": "-0.6718", "isp": "Oracle Cloud", "isprating": "3.7", "rating": "0", "ispdlavg": "0", "ispulavg": "0", "loggedin": "0", "country": "GB" } }
コメント