Giter Site home page Giter Site logo

pinggrapher's Introduction

Ping graph

Graph pings in your browser. All it does is great a web server that reads number from the stdout, writes them to a file and every {delay} seconds, sends nice statistics to the client (through websockets).

Why

Because my laptop (which I put under Linux) is quite slow (not because of Linux, but it just so old). So, with my desktop computer (that's under windows), I use it as a sort of web server, where I do all of my dev from. The problem being that when our router started to get slow for some reason (500ms ping), using ssh was somewhat annoying. So, I made this little thing to try to find some patterns and find the culprit on our local network ๐Ÿ˜„

Example

For now, you have to use a separate utility that pings for you (the awk command is just used to filter everything out and just print the milliseconds)

$ ping 192.168.0.1 | awk  '/from/ { split($7, resArr, "="); print resArr[2] }' | pinggrapher

And if you let it run long enough, you should get something that hopefully has less bars than this:

ping graph sample

Options

pinggrapher -help

What's it made of?

A Go file which act as the web server, with ws for the web socket, and some vanilla JavaScript on the front end, with Chart.js for the nice graphs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.