{"id":564,"date":"2011-07-13T13:01:41","date_gmt":"2011-07-13T13:01:41","guid":{"rendered":"https:\/\/fir3netwp.gmsrrpobkbd.com\/2011\/07\/13\/test-bandwith-on-linux\/"},"modified":"2021-07-30T15:05:27","modified_gmt":"2021-07-30T15:05:27","slug":"test-bandwith-on-linux","status":"publish","type":"post","link":"https:\/\/www.fir3net.com\/General-UNIX\/test-bandwith-on-linux.html","title":{"rendered":"How can I test the bandwith using a Linux shell ?"},"content":{"rendered":"
The other day I was faced with the problem of determining the networking bandwidth of a Linux system via just the shell.
\nAfter some googling and some head scratching I eventually came up with the following command.<\/p>\n
echo “scale=2; `curl\u00a0 –progress-bar -w “%{speed_download}” http:\/\/speedtest.wdc01.softlayer.com\/downloads\/test10.zip -o test.zip` \/ 131072″ | bc | xargs -I {} echo {}Mb\\\/s<\/p>\n
When testing there are 3 files you can use to test. These are:<\/p>\n
\u00a0 \u00a0 \u00a0 http:\/\/speedtest.wdc01.softlayer.com\/downloads\/test10.zip<\/em> These files are 10, 100 and 500Mb in size. Generally speaking a majority of people will be able to download the 10Mb file. If your download speed is over 20Mb then you may want to download the 100Mb file to ensure accurate results.<\/p>\n <class=”codemulti”>[root@server ~]# echo “scale=2; `curl\u00a0 –progress-bar -w “%{speed_download}” http:\/\/speedtest.wdc01.softlayer.com\/downloads\/test10.zip -o test.zip` \/ 131072″ | bc | xargs -I {} echo {}Mb\\\/s <class=”codemulti”>The following link was a great help in determining the different bit to byte conversions – http:\/\/www.matisse.net\/bitcalc\/<\/a><\/class=”codemulti”><\/p>\n","protected":false},"excerpt":{"rendered":" The other day I was faced with the problem of determining the networking bandwidth of a Linux system via just the shell. After some googling and some head scratching I eventually came up with the following command. echo “scale=2; `curl\u00a0 –progress-bar -w “%{speed_download}” http:\/\/speedtest.wdc01.softlayer.com\/downloads\/test10.zip -o test.zip` \/ 131072″ | bc | xargs -I {} echo … Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52],"tags":[],"yoast_head":"\n
\n\u00a0 \u00a0 \u00a0 http:\/\/speedtest.wdc01.softlayer.com\/downloads\/test100.zip<\/em>
\n\u00a0 \u00a0 \u00a0 http:\/\/speedtest.wdc01.softlayer.com\/downloads\/test500.zip<\/em><\/p>\nExample<\/strong>
\n<class=”codemulti”><\/class=”codemulti”><\/h4>\n
\n######################################################################## 100.0%
\n1.61Mb\/s<\/class=”codemulti”><\/p>\nReference<\/strong><\/h4>\n