A powerful CLI tool to track internet speed over time with smart alerts, beautiful reports, and comprehensive monitoring capabilities.
- π Continuous Monitoring - Track speed at configurable intervals (5m, 30m, 1h, etc.)
- π¨ Smart Alerts - Get notified when speed drops below your threshold
- π Beautiful Reports - Generate charts and export data (PNG, CSV, JSON)
- πΎ Historical Data - SQLite database stores all your speed test history
- π Server Selection - Test against closest or fastest servers
- π¨ Rich CLI - Colored output with formatted tables
- π Virtual Environment - Isolated dependencies for clean installation
- β‘ Easy Alias - Simple
speed-monitor
command after installation
# Clone the repository
git clone https://github.com/LinuxCTRL/network-speed-monitor.git
cd network-speed-monitor
# Install with virtual environment (recommended)
chmod +x install_venv.sh
./install_venv.sh
# Restart terminal or reload shell
source ~/.bashrc
# Test your installation
speed-monitor --help
# Run a quick speed test
speed-monitor test --quick
# Start continuous monitoring (every 30 minutes, alert below 50 Mbps)
speed-monitor start --interval 30m --alert-threshold 50Mbps
# Generate a weekly report with chart
speed-monitor report --last-week --export png
# View recent history
speed-monitor history --limit 10
Command | Description | Example |
---|---|---|
start |
Begin continuous monitoring | speed-monitor start --interval 15m --alert-threshold 25Mbps |
stop |
Stop monitoring process | speed-monitor stop |
status |
Show current monitoring status | speed-monitor status |
test |
Run single speed test | speed-monitor test --quick |
Command | Description | Example |
---|---|---|
report |
Generate comprehensive reports | speed-monitor report --last-week --export png |
history |
Show recent test history | speed-monitor history --limit 20 |
cleanup |
Remove old data | speed-monitor cleanup --days 30 |
# Monitoring with custom settings
speed-monitor start --interval 5m --alert-threshold 100Mbps --email user@example.com
# Detailed reports
speed-monitor report --stats # Show statistics
speed-monitor report --today --export csv # Today's data as CSV
speed-monitor report --last-month --export json # Monthly data as JSON
# Server selection
speed-monitor test --servers closest # Use closest servers
speed-monitor test --servers fastest # Use fastest servers
βββββββββββββββββββ¬ββββββββββββββββββ
β Metric β Value β
βββββββββββββββββββΌββββββββββββββββββ€
β Download Speed β 85.4 Mbps β
β Upload Speed β 12.3 Mbps β
β Ping β 23.1 ms β
β Server β New York, US β
β ISP β Verizon β
β Timestamp β 2024-01-15 14:30β
βββββββββββββββββββ΄ββββββββββββββββββ
π Starting speed monitoring...
π Interval: 900s (15m)
π¨ Alert threshold: 50.0 Mbps
πΎ Database: /home/user/.local/share/speed-monitor/speeds.db
Press Ctrl+C to stop
π Running speed test...
βββββββββββββββββββ¬ββββββββββββββββββ
β Metric β Value β
βββββββββββββββββββΌββββββββββββββββββ€
β Download Speed β 45.2 Mbps β
β Upload Speed β 8.7 Mbps β
β Ping β 28.3 ms β
β Server β Chicago, US β
β Status β ALERT β
β Timestamp β 14:32:15 β
βββββββββββββββββββ΄ββββββββββββββββββ
π¨ SPEED ALERT: Download speed (45.2 Mbps) is below threshold (50.0 Mbps)
β° Next test in 15 minutes...
The tool generates beautiful charts showing your internet speed over time:
- PNG Charts - Visual speed trends with download/upload lines
- CSV Export - Raw data for spreadsheet analysis
- JSON Export - Structured data for programmatic use
- Statistics - Min, max, average speeds and alert counts
Configuration is stored at ~/.config/speed-monitor/config.json
:
{
"default_interval": "15m",
"default_threshold": "10Mbps",
"database_path": "~/.local/share/speed-monitor/speeds.db",
"alert_email": null,
"preferred_servers": ["closest"],
"log_level": "INFO"
}
- Python 3.7+
- speedtest-cli (automatically installed)
- Virtual environment (automatically created)
speedtest-cli>=2.1.3 # Speed testing
matplotlib>=3.5.0 # Chart generation
click>=8.0.0 # CLI interface
tabulate>=0.9.0 # Table formatting
colorama>=0.4.4 # Colored output
requests>=2.25.0 # HTTP requests
- Database:
~/.local/share/speed-monitor/speeds.db
(SQLite) - Config:
~/.config/speed-monitor/config.json
- Logs:
~/.local/share/speed-monitor/alerts.log
All data is stored locally for privacy and security.
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run directly
python3 speed_monitor_complete.py --help
network-speed-monitor/
βββ speed_monitor_complete.py # Main application
βββ install_venv.sh # Installation script
βββ run.sh # Runner script
βββ requirements.txt # Dependencies
βββ README.md # This file
βββ demo.py # Demo script
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- speedtest-cli for the speed testing functionality
- Click for the excellent CLI framework
- matplotlib for chart generation
- π Bug Reports: Open an issue
- π‘ Feature Requests: Start a discussion
- π§ Contact: sofalcons@outlook.com
β Star this repo if you find it helpful!
Made with β€οΈ for network monitoring enthusiasts