Skip to content
/ ispmon Public

📈🔍Your persistent ISP bandwidth monitor

License

Notifications You must be signed in to change notification settings

devcsrj/ispmon

Repository files navigation

ISPMON

GitHub

Your persistent ISP bandwidth monitor.

As a software engineer who relies on managed dependencies, the least of your concerns SHOULD be the managed dependencies. This is not the case in the country I am living in.

I am currently subscribed to my ISP's fiber connection offering. It promises no data cap, maxed at 25Mbps, but with a teeny tiny asterisk that says:

30% minimum speed at 80% service reliability.

Then came that night, when our internet speed dropped down to 1Mbps. I could've tolerated it if it only happened rarely. But it happened consistently at certain times of the day, and it made me realize that they might be throttling connections at specified times of the day.

To track that down (and soon nag about it), I started this project.

Running

You can download the jar from the releases, and run it with:

$ java -jar ispmon-1.0.0.jar

Or, if you're like me, who loves running applications on Docker:

$ docker run -p 5000:5000 -t -d --name ispmon devcsrj/ispmon:1.0.0

Configuration options below can be overridden with the --env argument. In addition, results are stored in a directory called results. To persists the results across container restarts, configure the volume. For example:

docker run -p 5000:5000 -t -d --volume /path/in/host:/opt/results --name ispmon devcsrj/ispmon:1.0.0

Configuring

The application reads the following from the environment variables:

  • ISPMON_INTERVAL=15 - (minutes) the interval at which, speed test should be done
  • ISPMON_DURATION=30 - (seconds) the maximum time to conduct speed tests
  • ISPMON_PORT=5000 - the port to run the web server
  • TZ - to set the timezone

Developing

Prerequisites

  • JDK 8

Tip: Use sdkman.

$ sdk install java 19.2.0-grl

Backend

To run the server:

$ ./gradlew run

It will then start a server at port 5000.

Frontend

The frontend resides under src/main/frontend. It also expects that the backend is running at port 5000.

$ cd src/main/frontend
$ yarn run start

This will start the webpack server at port 5001.

Building

To build a jar:

$ ./gradlew build

You can then run this with java -jar build/lib/ispmon-$version.jar.


FAQ

  • Have you tried switching to another ISP?

    Well, there's another ISP here, but I'd argue it's not any better. At work, I ran ispmon to see the results for comparison. I am staggered:

  • Did you really have to go this far?

    I also needed an excuse to play with new shiny things. This is my first project that involved:

    • The ultra-fast and lean Vertx
    • The coroutine-powered Ktor
    • The well-loved React
    • The smart bundler webpack
    • and the bleeding edge Graal Native Image