Sends one ping per second to 8.8.8.8 and displays:
- Latency (ms)
- Packet timeout detection
- Running average
- Minimum latency
- Maximum latency
- Total successful pings
- Timestamp per request
Designed for quick terminal-based diagnostics on Windows, Linux, or WSL.
-
Cross-platform (Windows / Linux)
-
Clean terminal UI
-
ANSI colored output
-
Automatic timeout detection
-
Rolling statistics:
AVGMINMAX- Packet count
-
1-second interval monitoring
-
Uses
subprocess.run()to execute the systempingcommand. -
Automatically selects:
-n 1 -w 10000on Windows-c 1 -W 10on Linux
-
Extracts latency using regex:
time=8.32 ms -
Maintains live statistics in memory.
Think of it like a mini network heartbeat monitor running in your terminal.
- Python 3.8+
- System
pingcommand available in PATH
No external dependencies required.
Clone (git clone https://github.com/URDev4ever/Ping-Monitor.git) or download the script, then:
python ping_monitor.pyor
cd Ping-Monitorfirst if cloned
Stop with:
CTRL + C
If you want to change the target:
command = ["ping", "-c", "1", "-W", "10", "8.8.8.8"]Replace 8.8.8.8 with:
- Your router (e.g.
192.168.0.1) - Cloudflare (
1.1.1.1) - A specific host you want to monitor
| Metric | Meaning |
|---|---|
| ms | Current ping latency |
| AVG | Average latency since start |
| MIN | Lowest recorded latency |
| MAX | Highest recorded latency |
| Count | Successful ping responses |
- Monitoring unstable Wi-Fi
- Checking packet drops
- Measuring latency fluctuations
- Debugging WSL networking
- Lightweight alternative to tools like
mtr
- This tool was ONLY tested on Kali Linux (WSL), if there are any bugs with other distributions please let me know.
- This does not calculate packet loss percentage.
- It depends on the system’s
pingbinary. - ANSI colors may not display correctly in some older Windows terminals.
Made with <3 by URDev.