eff

Network connectivity monitor. Continuously pings a target and sends desktop notifications when your connection drops or recovers.
Install
# From source
go install github.com/taigrr/eff@latest
# Or download from releases
Usage
# Default: ping 1.1.1.1 every 3s, notify on state changes
eff
# Custom target and interval
eff --interval 5s --threshold 5 8.8.8.8
# Disable notifications (log only)
eff --notify=false
# Use raw ICMP sockets when running with the required privileges
eff --privileged
# Debug mode (show each ping)
eff --debug
Flags
| Flag |
Default |
Description |
--interval, -i |
3s |
Ping interval |
--threshold, -t |
3 |
Consecutive failures before declaring down |
--notify, -n |
true |
Send desktop notifications |
--privileged |
false |
Use privileged raw ICMP sockets |
--debug |
false |
Show individual ping results |
How It Works
- Sends ICMP pings at the configured interval
- After N consecutive failures (threshold), declares the network down
- Sends a desktop notification (notify-send on Linux, osascript on macOS)
- When pings succeed again, declares the network up and reports downtime duration
Systemd Service
Run as a persistent user service:
cp contrib/eff.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now eff
The bundled unit is designed for systemctl --user and sets the desktop session environment needed for notify-send.
See contrib/README.md for details and troubleshooting.
Library Usage
The monitor is importable:
import "github.com/taigrr/eff/monitor"
m := monitor.New(monitor.Config{
Target: "1.1.1.1",
Interval: 3 * time.Second,
Threshold: 3,
OnStateChange: func(e monitor.Event) {
fmt.Printf("Network %s\n", e.State)
},
})
m.Run(ctx)
Background
Built because Xfinity says 500mbps but streams at 0.1mbps. This tool tells you the moment your connection actually drops — no more wondering if it's you or the ISP.
License
Released under the 0BSD license.