A hyper-minimalist network monitor for Windows (Batch) and Linux/macOS (Bash). PingWatch is optimized for low-resource environments (like mobile hotspots or metered USB tethering), using native system commands to log connectivity without extra dependencies.
- Latency Tracking: Automatically captures and logs network response times (ms).
- Locale-Agnostic: Smart parsing (Win) works across all system languages (English, French, German, etc.).
- Cross-Platform: Full support for Windows (
.bat) and Unix-like systems (.sh). - Colorful Interface: High-visibility terminal output (Yellow for info, Green for success, Red for failure).
- Smart OS Detection: Automatically adjusts ping flags for Git Bash (Windows) vs. Linux/macOS environments.
- Zero Dependencies: No Python, Node.js, or external tools required—just native shell magic.
- Set-and-Forget: Configure your target once and let it run in the background.
- Resource Efficient: Consumes ~1.5MB of RAM and effectively 0% CPU while idling.
- Interactive Hotkeys: Switch between 5 different targets on-the-fly (
1-5) or toggle ping intervals. - On-Demand Checking: Press any key while focused to trigger a ping immediately.
- Precision Logging: Precise timestamps
[DD/MM/YYYY HH:MM:SS]for every entry.
Both scripts contain a Settings block at the top. Open PingWatch.bat (Windows) or PingWatch.sh (Linux/macOS) in any text editor to edit:
set "TARGET=8.8.8.8" :: Google Public DNS (Google.com)
set "PACKETS=1" :: Number of pings to send per check
set "INTERVAL=600" :: Time between checks (in seconds)
set "LOG=%~dp0PingWatch.log" :: Output log filenameTARGET="8.8.8.8" # Google Public DNS (Google.com)
PACKETS=1 # Number of pings to send per check
INTERVAL=600 # Time between checks (in seconds)
LOG="PingWatch.log" # Output log filename- Launch: Double-click
PingWatch.bat. - Monitor: The console will show status, and a
PingWatch.logfile is updated in the same folder. - Hotkeys: Press
1-5to change targets, orF/M/Nto change the ping interval. - On-Demand: Press any other key to trigger a ping immediately.
- Stop: Press Ctrl+C or close the window.
- Permissions: Make the script executable:
chmod +x PingWatch.sh - Launch: Run it from the terminal:
./PingWatch.sh - Monitor: Status is printed and appended to
PingWatch.log. - Hotkeys: Press
1-5to change targets, orf/m/nto change the ping interval. - On-Demand: Press any other key to trigger an instant ping.
- Stop: Press Ctrl+C.
If you want the most reliable monitoring without being filtered or blocked for frequent pings, consider using these high-availability public DNS addresses:
| Provider | Hostname / IP | Benefit |
|---|---|---|
| Google DNS | 8.8.8.8 |
Highly reliable and virtually never down. |
| Cloudflare | 1.1.1.1 |
Optimized for speed and handles high ICMP traffic. |
| Quad9 | 9.9.9.9 |
High stability with security focus. |
| OpenDNS | 208.67.222.222 |
Enterprise-grade availability. |
| Google Site | google.com |
A solid check for actual web accessibility. |
Tip
For best results, use IPs like 8.8.8.8 or 1.1.1.1 instead of domain names. This bypasses DNS lookups and ensures you are testing your raw internet connection.
For deeper insights into the scripts, please see:
- CODE_DOCUMENTATION.md - Technical details and implementation mechanisms.
- DESIGN_PHILOSOPHY.md - Project goals, reasoning, and core ideology.
| Resource | Usage | Why? |
|---|---|---|
| CPU | < 0.1% | Spends 99.8% of time in an idle sleep state. |
| RAM | ~1.5 MB | Overhead of a standard cmd.exe or bash process. |
| Network | ~32 Bytes / Check | Minimal ICMP Echo Request packets. |
| Disk | ~50 Bytes / Entry | Direct, efficient binary-safe appending to .log. |
Entries in PingWatch.log are designed to be easily grep-able or imported into Excel:
[07/03/2026 13:45:12] SUCCESS - 8.8.8.8 is reachable (Latency: 28ms)
[07/03/2026 13:55:04] SUCCESS - 8.8.8.8 is reachable (Latency: 31ms)
[07/03/2026 14:05:59] FAILURE - 8.8.8.8 is NOT reachable
- Minimize to Tray (Win): Run the script and minimize; it continues logging without slowing your PC.
- Background (Unix): Run as a background process with
nohup ./PingWatch.sh &. - Multiple Targets: Copy the script into different folders. Each instance will manage its own
PingWatch.log. - Auto-Start:
- Windows: Place a shortcut to
.batinshell:startup. - Linux: Add to your
.bashrcorcrontab -e @reboot.
- Windows: Place a shortcut to
- Windows Defender: On Windows 11, if Defender flags the script, right-click → Properties → Unblock.
- Windows: Windows 7 / 8 / 10 / 11 (Any edition).
- Unix: Linux (Any distro), macOS, or WSL.
- Rights: Standard user permissions (Administrator/Root NOT required).
- Disk: ~500KB for the script; log size depends on duration.