Speed & ping tests from shell

Having *finally* got internet access in our new London flat, a month after we ordered it, I wanted to test the quality of the connection.

Downstream speed test

Use a compressed Linux kernel source for our speed test, taking advantage of how cURL annoyingly violates the UNIX “rule of silence”:

$ curl 'https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.3.tar.xz' > /dev/null

As the file is highly compressed, we are measuring raw bandwidth regardless of whether some part of our link has transparent compression. When the speed has stabilised, Ctrl+C to end the test.

Ping test

Run as root, required for ping flooding. Google probably won’t feel/notice/mind you ping-flooding their DNS servers:

$ ping -f -c 1000 -i 0.03 -W 1 -s 1350 -M do 8.8.8.8

Adjust 1350 to be slightly less than your MTU (1350 is a safe guess if you’re unsure). When the flood is complete (~10 seconds), you should receive your mean ping time, jitter, packet loss, etc.