[Howto] Quick & dirty Speedtest DL+UL from CLI with no tools/packages required
Rico LAYER 8 Rebel Alliance last edited by
Curious everybody knows you can do Speedtests from the pfSense CLI for Download AND Upload just out of the box without installing any packages or tools? :-)
YES we all know speed testing should be done from a client behind the Firewall because pfSense is not optimized to act as a client.
But for a quick check to see the new pipe really provide 100/50Mbps it's handy. If you see lower bandwidth as expected use a client behind pfSense to recheck!
For downloading we use
fetch, the full command looks like this:
fetch -o /dev/null http://speedtest.tele2.net/1GB.zip
and the output after downloading the 1GB file:
/dev/null 1024 MB 32 MBps 31s
While downloading I also like to check the traffic from the pfSense WebGUI in Status > Traffic Graph
Tele2 provides different filesizes for download testing:
http://speedtest.tele2.net/1MB.zip http://speedtest.tele2.net/10MB.zip http://speedtest.tele2.net/100MB.zip http://speedtest.tele2.net/1GB.zip http://speedtest.tele2.net/10GB.zip http://speedtest.tele2.net/50GB.zip http://speedtest.tele2.net/100GB.zip http://speedtest.tele2.net/1000GB.zip
If Tele2 does not work for you, try other Speedtests like BelWue:
http://speedtest.belwue.net/100M http://speedtest.belwue.net/1G http://speedtest.belwue.net/10G http://speedtest.belwue.net/100G http://speedtest.belwue.net/1000G
Surely there are many other Speedtests around providing pure testfiles, would be nice if we could collect some in this thread.
With really beefy pipes you probably need to open multiple CLIs and run tests simultaneously against different servers.
For testing the upload speed we use
curl. Full command is
curl -T /dev/random ftp://speedtest.tele2.net/upload/
and the output
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 368M 0 0 0 368M 0 5975k --:--:-- 0:01:03 --:--:-- 4739k
Because we use /dev/random as source this test runs indefinitely, hitting CTRL+C stops uploading and show the stats.
In place of /dev/random you could also upload any other file, maybe grab one of the 1GB testfiles from the download test. Due to small disk size of most pfSense installations I like to use simply /dev/random.
Same as for download speedtests, would be nice to collect some upload servers here.
Happy testing. :-)