Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PingTracer-web

A continuous ping monitor with a dense, scroll-back latency graph that you view in any browser. Inspired by bp2008/pingtracer. This is a fresh reimplementation rather than a port, aiming for the same usage vibe.

PingTracer-web screenshot

The pinger runs on the host and serves a single-page UI over plain HTTP, so it works on a headless server that you reach from your laptop browser. It needs no root because it uses the system ping, and it has no external Nim dependencies.

Features

Each host gets its own dense graph, one thin column per ping, with packet loss drawn in red. You can scroll back through history by dragging or wheel-scrolling, then double-click to jump back to live. Hovering shows a crosshair and a readout of the timestamp, the ping value, and the latency at the cursor height. The time axis uses stable clock ticks. Live controls let you add or remove hosts, change the ping rate, and set colour thresholds and the vertical scale. It runs on both Linux and Windows.

Build

Needs Nim 2.0 or newer and a C compiler.

nim c -d:release --threads:on -o:pingtracerd src/pingtracerd.nim

Run

./pingtracerd 8.8.8.8 1.1.1.1 -r 5

Then open http://127.0.0.1:8080 in a browser. The flags are -r, --rate for pings per second per host (default 2), -t, --timeout for the per-ping timeout in ms (default 1000), -p, --port for the HTTP port (default 8080), and --bind for the bind address (default 127.0.0.1).

For a remote or headless box, bind to 0.0.0.0 for LAN access, or keep the default and forward the port over SSH.

ssh -L 8080:localhost:8080 user@host

Notes

Ping history lives in memory only, so a server restart clears it. On Linux the ICMP goes through the system ping binary, so no elevated privileges are required.

Layout

The ICMP probe lives in src/icmp.nim, the HTTP server and background pinger in src/pingtracerd.nim, and the whole single-page UI in web/index.html.

License

See ./LICENSE.