Speedtest.net CLI interface is easiest way.
sudo apt-get install pip
sudo pip install --upgrade
sudo pip install speedtest-cli
speedtest --list | ack -i 'san jose, ca'
9383) Sneaker Server (San Jose, CA, United States) [4066.05 km]
5479) Sonic.net, Inc (San Jose, CA, United States) [4066.62 km]
9540) DNASOLES (San Jose, CA, United States) [4066.62 km]
speedtest --server 5479
I also can test upload by serving a 1GB.bin file and downloading it from another server that claims 10Gbps or whatever speed you have.
You can create a 1GB file by doing the following (linux):
dd if=/dev/zero of=1GB.bin bs=1 count=0 seek=1G
Or you can use this handy alias I made:
# add to ~/.bash_aliases
dd if=/dev/zero of=$file bs=1 count=0 seek=$size
$ mkfile_gple 1G 1GB.bin
On a mac, you can simply type:
mkfile 1g 1GB.bin
Then you can download from another server (to test your target servers upload speed) with
curl <ip-of-server>/1GB.bin -o /tmp/1GB.bin -- you should see the speed used in the transfer. You can also use
wget <ip-of-server>/1GB.bin -O /tmp/1GB.bin
To install nginx do
sudo apt-get install nginx and place your
1GB.bin file in
/var/www/html. Now just download that 1GB.bin file to test its upload speed (a server is uploading when it serves web traffic). Be sure the line you are downloading from has sufficient bandwith (ie: another 1Gbps server).
I've found that I usually get about 10-20% of advertised speeds due to network conditions. ie: a 250Mbps line usually will give me 10-12Mbps consistently.