DEV Community

Cover image for Weekend hack: a tiny tool to check internet speed right from Terminal
Jitendra
Jitendra

Posted on

Weekend hack: a tiny tool to check internet speed right from Terminal

Introducing a tiny utility built on Go using chromedp to check internet speed right from the terminal.

How to use it?

Make sure you have a Chrome browser installed, then install fast:

go get github.com/adhocore/fast/cmd/fast
Enter fullscreen mode Exit fullscreen mode

Finally, make sure $GOPATH or $HOME/go/bin is in your $PATH or %path%, then run

fast
Enter fullscreen mode Exit fullscreen mode

You will see something like this
fast


GitHub logo adhocore / fast

Check your internet speed right from your terminal. Built on GOlang using chromedp

adhocore/fast

Go Report Lint Donate 15 Donate 25 Donate 50 Tweet

A GO lang command line tool to check internet speed right from the terminal.

Uses fast.com through headless chrome.

Prerequistie

Chrome browser must be installed. chromedp will try to locate the chrome executable automatically from these paths.

If you get error regarding chrome availability, and you have chrome in custom path then check Troubleshooting.

Usage

Install fast:

go get -u github.com/adhocore/fast/cmd/fast
# or in recent go versions:
go install github.com/adhocore/fast/cmd/fast@v1.1.0
Enter fullscreen mode Exit fullscreen mode

Finally, make sure $GOPATH or $HOME/go/bin is in your $PATH or %path%, then run:

fast

# if you just want download speed (pass -noup aka no upload speed)
fast -noup
Enter fullscreen mode Exit fullscreen mode

Wait a while or Ctrl+C if you can't. That's all.

Screen

FAST

Troubleshooting

In MacOS, you can do something like this:

echo '#!/bin/sh\n\n/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome $@' > /usr/local/bin/chrome

chmod +x /usr/local/bin/chrome
Enter fullscreen mode Exit fullscreen mode

In WSL, you can symlink chrome from host WinOS like this:

Enter fullscreen mode Exit fullscreen mode

Top comments (2)

Collapse
 
andreas_andreas_9e6489a15 profile image
Andreas Andreas

Hey everyone, I'm having some issues with my internet connection lately. It's been really slow and sometimes it just drops out completely. I'm not sure if it's my provider, my router, or something else. I want to figure out what the problem is, so I thought checking my internet speed might be a good first step. Does anyone know how to do that? Are there any reliable tools or websites that can help me measure my internet speed accurately? Also, if anyone has tips on what to look for when interpreting the results, that would be super helpful. Thanks in advance!

Collapse
 
dylliflle profile image
Dylliflle

I had a similar issue with my internet speed a while back. The connection was lagging, and streaming anything was a nightmare. I used the website speed.limited to check my internet speed test, and it was pretty straightforward. Just go to the site, click the button to start the test, and it gives you your download and upload speeds along with your ping. It's really user-friendly and quick. One thing I liked about speed.limited is that it provides a detailed breakdown of your results and compares them to the average speeds in your area, so you get a clear picture of how your internet is performing relative to others. Additionally, the site offers some tips on how to improve your speed based on common issues, like checking for firmware updates on your router or reducing the number of devices connected. Using this tool helped me identify that my router needed a firmware update, which significantly improved my speed. I recommend giving it a try to see if it helps pinpoint your problem.