A beautiful, lightweight system monitoring tool for your terminal
- π¨ Beautiful Terminal UI - Rich colors, progress bars, and organized layouts
- β‘ Real-time Monitoring - Live dashboard with auto-refresh
- πΎ Data Persistence - Store snapshots in JSON or SQLite
- π Historical Data - View and analyze past system metrics
- π― Top Processes - Track resource-hungry applications
- π§ Highly Configurable - YAML-based configuration with sensible defaults
- π¦ Multiple Export Formats - JSON output for scripting and automation
- πͺ΅ Smart Logging - Rotating logs with configurable levels
- π₯οΈ Cross-Platform - Works on Windows, macOS, and Linux
- π Lightweight - Minimal resource usage and dependencies
- Installation
- Quick Start
- Usage
- Configuration
- Commands Reference
- Development
- Project Structure
- FAQ
- Contributing
- License
- Acknowledgments
# Clone the repository
git clone https://github.com/OR-6/sysmon.git
cd sysmon
# Run the installation script
.\install.ps1
# Optional: Add to PATH for 'sysmon' command
.\install.ps1 -AddToPath# Clone the repository
git clone https://github.com/OR-6/sysmon.git
cd sysmon
# Run the installation script
bash install.sh
# Optional: Add to system PATH
sudo ln -s $(pwd)/sysmon /usr/local/bin/sysmonpip install sysmonitor- Python 3.8 or higher
- pip (Python package manager)
- Works on Windows, macOS, and Linux
# Windows
python run.py monitor
# Linux/Mac
./sysmon monitor
# All platforms
python -m sysmon.cli monitorThat's it! Press Ctrl+C to exit.
Start the live monitoring dashboard:
# Default settings (2 second refresh)
sysmon monitor
# Custom refresh interval
sysmon monitor -i 5
# Show per-CPU core usage
sysmon monitor --per-cpu
# Hide process list for cleaner view
sysmon monitor --no-processesControls:
Ctrl+C- Exit the dashboard
Capture a single system snapshot:
# Simple snapshot
sysmon snapshot
# JSON output (great for scripts)
sysmon monitor --json > snapshot.jsonView stored historical data (requires storage to be enabled):
# Show last 10 snapshots
sysmon history
# Show last 50 snapshots
sysmon history -n 50
# Export as JSON
sysmon history --json > history.jsonManage your settings:
# View current configuration
sysmon config show
# Show config file location
sysmon config path
# Change settings
sysmon config set display.refresh_interval 5
sysmon config set storage.enabled true
sysmon config set storage.backend sqlite
# Reset to defaults
sysmon config resetExport your stored snapshots:
# Export to JSON file
sysmon export snapshots.json
# Export to specific location
sysmon export ~/backups/system-data-$(date +%Y%m%d).jsonRemove all stored snapshots:
sysmon clearConfiguration is stored in ~/.config/sysmon/config.yaml
display:
refresh_interval: 2 # Refresh every N seconds
show_per_cpu: false # Show individual CPU cores
show_processes: true # Display top processes
process_count: 5 # Number of processes to show
progress_bar_width: 30 # Width of progress bars
storage:
enabled: false # Enable data persistence
backend: json # 'json' or 'sqlite'
path: ~/.local/share/sysmon/data
max_records: 1000 # Keep last N snapshots
logging:
enabled: true # Enable logging
level: INFO # DEBUG, INFO, WARNING, ERROR
path: ~/.local/share/sysmon/logs
max_size_mb: 10 # Max log file size
backup_count: 3 # Number of backup filesEnable data storage:
sysmon config set storage.enabled true
sysmon config set storage.backend sqliteShow more processes:
sysmon config set display.process_count 10Change refresh rate:
sysmon config set display.refresh_interval 1Enable per-CPU monitoring:
sysmon config set display.show_per_cpu truesysmon --version # Show version
sysmon --help # Show helpsysmon monitor [OPTIONS]
Options:
-i, --interval INTEGER Refresh interval in seconds
--per-cpu Show per-CPU core usage
--no-processes Hide process list
--json Output as JSON (single snapshot)
--help Show helpsysmon snapshot # Take a single snapshotsysmon history [OPTIONS]
Options:
-n, --limit INTEGER Number of snapshots to show (default: 10)
--json Output as JSON
--help Show helpsysmon config show # Display current configuration
sysmon config path # Show config file location
sysmon config set KEY VALUE # Set a configuration value
sysmon config reset # Reset to defaultssysmon export OUTPUT_PATH # Export stored datasysmon clear # Clear all stored data# Clone the repository
git clone https://github.com/OR-6/sysmon.git
cd sysmon
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
.\venv\Scripts\activate
# Linux/Mac:
source venv/bin/activate
# Install in development mode with dev dependencies
pip install -e ".[dev]"# Run all tests
pytest
# Run with coverage
pytest --cov=sysmon tests/
# Run specific test file
pytest tests/test_core.py# Format code
black src/
# Check style
flake8 src/
# Type checking
mypy src/# Build package
python -m build
# Install locally
pip install dist/sysmon-0.1.0-py3-none-any.whlsysmon/
βββ src/
β βββ sysmon/
β βββ __init__.py # Package initialization
β βββ cli.py # Command-line interface (Click)
β βββ core.py # System monitoring logic
β βββ display.py # Rich terminal display
β βββ storage.py # Data persistence (JSON/SQLite)
β βββ config.py # Configuration management
β βββ models.py # Pydantic data models
β βββ utils.py # Helper functions
βββ tests/
β βββ __init__.py
β βββ test_core.py # Unit tests
βββ examples/
β βββ config.example.yaml # Example configuration
βββ screenshots/ # Screenshots for README
βββ run.py # Cross-platform launcher
βββ sysmon # Unix/Linux/Mac launcher
βββ sysmon.bat # Windows batch launcher
βββ install.sh # Unix installation script
βββ install.ps1 # Windows installation script
βββ pyproject.toml # Project metadata and dependencies
βββ setup.py # Setup configuration
βββ requirements.txt # Python dependencies
βββ README.md # This file
βββ LICENSE # MIT License
βββ .gitignore # Git ignore rules
sysmon config set storage.enabled trueCurrently, export is JSON only. You can convert JSON to CSV using tools like jq or Python:
# Using jq (if installed)
sysmon history --json | jq -r '.[] | [.timestamp, .cpu.percent, .memory.percent] | @csv'Make sure you're not running SysMon on a very fast refresh interval. CPU measurement needs at least 1 second to be accurate.
pip uninstall sysmonitorYes! SysMon works perfectly over SSH connections as it's a pure terminal application.
Not directly. SysMon monitors the local system where it's running. For remote monitoring, SSH into the remote system and run SysMon there.
- JSON: Simple, human-readable, easy to backup
- SQLite: More efficient for large datasets, faster queries
Each snapshot is approximately 1-2 KB. With default settings (1000 max records), you'll use about 1-2 MB.
Contributions are welcome! Here's how you can help:
- Check if the bug has already been reported in Issues
- If not, create a new issue with:
- Clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- Your system info (OS, Python version)
Open an issue with the enhancement label describing:
- The feature you'd like to see
- Why it would be useful
- How it might work
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests if applicable
- Ensure all tests pass (
pytest) - Format your code (
black src/) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow PEP 8 style guide
- Add type hints to all functions
- Write docstrings for public APIs
- Include tests for new features
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
- psutil - Cross-platform system and process utilities
- Rich - Beautiful terminal formatting
- Click - Elegant CLI framework
- Pydantic - Data validation using Python type annotations
Inspired by tools like:
- Alert system with threshold notifications
- Custom dashboard layouts
- Network interface selection
- Disk I/O monitoring
- GPU monitoring support (NVIDIA, AMD)
- Docker container stats
- Temperature sensors
- Battery status (laptops)
- Web UI option
- Prometheus exporter
- Plugin system
- Remote monitoring capability
- Author: Numair Khan
- Email: ornor6@gmail.com
- GitHub: @OR-6
- Issues: GitHub Issues
Made with β€οΈ by developers, for developers
If you find this tool useful, consider giving it a β on GitHub!



