A beautiful terminal-based system monitoring tool
Project description
SysMon ๐
A beautiful, lightweight system monitoring tool for your terminal
๐ธ Screenshots
Main Dashboard
Snapshot View
History View
โจ Features
- ๐จ 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
๐ฌ Demo
๐ Table of Contents
- Installation
- Quick Start
- Usage
- Configuration
- Commands Reference
- Development
- Project Structure
- FAQ
- Contributing
- License
- Acknowledgments
๐ Installation
Windows
# 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
Linux / macOS
# 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/sysmon
From PyPI (Coming Soon)
pip install sysmon
Requirements
- Python 3.8 or higher
- pip (Python package manager)
- Works on Windows, macOS, and Linux
๐ฏ Quick Start
# Windows
python run.py monitor
# Linux/Mac
./sysmon monitor
# All platforms
python -m sysmon.cli monitor
That's it! Press Ctrl+C to exit.
๐ Usage
Monitor Dashboard
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-processes
Controls:
Ctrl+C- Exit the dashboard
Take Snapshots
Capture a single system snapshot:
# Simple snapshot
sysmon snapshot
# JSON output (great for scripts)
sysmon monitor --json > snapshot.json
View History
View 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.json
Configuration
Manage 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 reset
Export Data
Export your stored snapshots:
# Export to JSON file
sysmon export snapshots.json
# Export to specific location
sysmon export ~/backups/system-data-$(date +%Y%m%d).json
Clear Data
Remove all stored snapshots:
sysmon clear
โ๏ธ Configuration
Configuration is stored in ~/.config/sysmon/config.yaml
Default Configuration
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 files
Configuration Examples
Enable data storage:
sysmon config set storage.enabled true
sysmon config set storage.backend sqlite
Show more processes:
sysmon config set display.process_count 10
Change refresh rate:
sysmon config set display.refresh_interval 1
Enable per-CPU monitoring:
sysmon config set display.show_per_cpu true
๐ Commands Reference
Global Options
sysmon --version # Show version
sysmon --help # Show help
Monitor Command
sysmon 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 help
Snapshot Command
sysmon snapshot # Take a single snapshot
History Command
sysmon history [OPTIONS]
Options:
-n, --limit INTEGER Number of snapshots to show (default: 10)
--json Output as JSON
--help Show help
Config Commands
sysmon 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 defaults
Export Command
sysmon export OUTPUT_PATH # Export stored data
Clear Command
sysmon clear # Clear all stored data
๐ ๏ธ Development
Setup Development Environment
# 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 Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=sysmon tests/
# Run specific test file
pytest tests/test_core.py
Code Quality
# Format code
black src/
# Check style
flake8 src/
# Type checking
mypy src/
Building Distribution
# Build package
python -m build
# Install locally
pip install dist/sysmon-0.1.0-py3-none-any.whl
๐ Project Structure
sysmon/
โโโ 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
โ FAQ
How do I enable data storage?
sysmon config set storage.enabled true
Can I export data to CSV?
Currently, 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'
Why is my CPU showing 0%?
Make sure you're not running SysMon on a very fast refresh interval. CPU measurement needs at least 1 second to be accurate.
How do I uninstall?
pip uninstall sysmon
Does this work over SSH?
Yes! SysMon works perfectly over SSH connections as it's a pure terminal application.
Can I monitor remote systems?
Not directly. SysMon monitors the local system where it's running. For remote monitoring, SSH into the remote system and run SysMon there.
What's the difference between JSON and SQLite storage?
- JSON: Simple, human-readable, easy to backup
- SQLite: More efficient for large datasets, faster queries
How much disk space does storage use?
Each snapshot is approximately 1-2 KB. With default settings (1000 max records), you'll use about 1-2 MB.
๐ค Contributing
Contributions are welcome! Here's how you can help:
Reporting Bugs
- 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)
Suggesting Features
Open an issue with the enhancement label describing:
- The feature you'd like to see
- Why it would be useful
- How it might work
Pull Requests
- 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
Code Guidelines
- 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
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- psutil - Cross-platform system and process utilities
- Rich - Beautiful terminal formatting
- Click - Elegant CLI framework
- Pydantic - Data validation using Python type annotations
Inspiration
Inspired by tools like:
๐บ๏ธ Roadmap
Version 0.2.0
- Alert system with threshold notifications
- Custom dashboard layouts
- Network interface selection
- Disk I/O monitoring
Version 0.3.0
- GPU monitoring support (NVIDIA, AMD)
- Docker container stats
- Temperature sensors
- Battery status (laptops)
Version 1.0.0
- Web UI option
- Prometheus exporter
- Plugin system
- Remote monitoring capability
๐ Stats
๐ง Contact
- 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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sysmonitor-0.1.0.tar.gz.
File metadata
- Download URL: sysmonitor-0.1.0.tar.gz
- Upload date:
- Size: 26.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abc83f1b279dfce9c6589682bded7da22b90cd2694a4d0a4816c676c3b790adc
|
|
| MD5 |
046c6f21728d6ce4ff3839eae14a957f
|
|
| BLAKE2b-256 |
e8196e8b916d1f919a326f99a277e21ae1f5f3230990619bbf994ca8faa66673
|
File details
Details for the file sysmonitor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sysmonitor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f36a743e41f0e3883b8d4b9ff82a5858c0009355e77e6833c598d12294c2cf1
|
|
| MD5 |
633295ca6ec32dafb9c0bbdd59a857e6
|
|
| BLAKE2b-256 |
e7eab048648e5bf7a9d57d399716c604fd9aa7e76d9be38258c0db26994fb043
|