Skip to content

bkocis/system-monitor-cli-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ–ฅ๏ธ System Monitor CLI Dashboard

A beautiful, real-time system monitoring dashboard for the terminal that provides comprehensive insights into your system's performance with live temperature graphs, resource usage, and hardware information.

Python 3.12+ License: MIT Ruff

System Monitor CLI Dashboard Real-time system monitoring dashboard in your terminal

โœจ Features

๐ŸŒก๏ธ Temperature Monitoring & History

  • Real-time temperature tracking for CPU and GPU
  • Visual temperature graphs with configurable history points
  • Color-coded alerts (green/yellow/red based on configurable thresholds)
  • Historical trends showing temperature patterns over time

๐Ÿ’ป System Resource Monitoring

  • CPU usage with percentage and core count
  • Memory usage with detailed used/total breakdown
  • Real-time updates with configurable refresh rate
  • Percentage-based color coding for quick status assessment

๐ŸŽฎ GPU Information

  • NVIDIA GPU support with detailed metrics
  • GPU utilization and temperature monitoring
  • VRAM usage (used/total memory)
  • Power consumption tracking
  • GPU model identification

๐Ÿ’ฟ Disk Usage Analysis

  • Multiple filesystem support with smart filtering
  • Dual view modes: exact bytes and GB format
  • Mounted drive information with usage percentages
  • Automatic filtering of virtual/temporary filesystems

โš™๏ธ Configuration System

  • JSON-based configuration with user-friendly defaults
  • Customizable refresh rates and temperature thresholds
  • Configurable display options and color schemes
  • Per-user configuration stored in ~/.config/system-monitor/

๐ŸŽจ Beautiful Terminal UI

  • Rich formatting with colors, emojis, and proper alignment
  • Live dashboard with smooth updates
  • Responsive layout that adapts to terminal size
  • Professional panels with clear section organization

๐Ÿ”ง Requirements

System Requirements

  • Linux (tested on Ubuntu/Debian-based systems)
  • Python 3.12+
  • NVIDIA GPU (optional, for GPU monitoring features)

Software Dependencies

  • nvidia-settings and nvidia-smi (for GPU monitoring)
  • sensors command (for CPU temperature - usually from lm-sensors package)

Install System Dependencies

# Ubuntu/Debian
sudo apt update
sudo apt install lm-sensors nvidia-utils-* python3.12 python3.12-venv

# Initialize sensors (run once)
sudo sensors-detect --auto

๐Ÿš€ Installation & Quick Start

Option 1: Install as Python Package (Recommended)

# Clone the repository
git clone https://github.com/bkocis/system-monitor-cli-app.git
cd system-monitor-cli-app

# Install the package
pip install -e .

# Run the dashboard
system-monitor

Option 2: Development Installation

# Clone the repository
git clone https://github.com/bkocis/system-monitor-cli-app.git
cd system-monitor-cli-app

# Set up development environment
make dev-setup
source venv/bin/activate

# Run the dashboard
make run

Option 3: Script-based Setup

# Clone the repository
git clone https://github.com/bkocis/system-monitor-cli-app.git
cd system-monitor-cli-app

# Run using the setup script
./scripts/run_dashboard.sh

# Or launch in dedicated terminal window
./scripts/monitoring_terms.sh

Option 4: Manual Setup

# Create virtual environment
python3.12 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run dashboard
python -m src.system_monitor.main

๐Ÿ“Š Dashboard Layout

The dashboard displays information in the following order:

๐Ÿ–ฅ๏ธ  SYSTEM DASHBOARD  |  2024-01-15 14:30:25
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”

๐ŸŒก๏ธ  Temperatures & History
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐Ÿญ CPU:    72ยฐC    [Temperature Graph]     โ”‚
โ”‚ ๐ŸŽฎ GPU:    65ยฐC    [Temperature Graph]     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ’พ System Info                ๐ŸŽฎ GPU Info
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐Ÿ’ป CPU Usage: 45%โ”‚          โ”‚ ๐ŸŽฎ GPU: RTX 4090โ”‚
โ”‚ ๐Ÿ”ข CPU Cores: 16โ”‚          โ”‚ โšก Usage: 23%   โ”‚
โ”‚ ๐Ÿง  Memory: 67%  โ”‚          โ”‚ ๐Ÿง  VRAM: 2.1GB  โ”‚
โ”‚ ๐Ÿ“ฆ Used: 32GB   โ”‚          โ”‚ โšก Power: 180W  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ’ฟ Disk Usage
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Filesystem    Size      Used      Avail  Use%โ”‚
โ”‚ /dev/sda1     500GB     350GB     150GB   70%โ”‚
โ”‚ /dev/sdb1     1TB       200GB     800GB   20%โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Press Ctrl+C to exit

โš™๏ธ Configuration

Configuration File

The dashboard uses a JSON configuration file located at ~/.config/system-monitor/config.json.

Create custom configuration:

# Copy default configuration
mkdir -p ~/.config/system-monitor
cp config/default.json ~/.config/system-monitor/config.json

# Edit configuration
nano ~/.config/system-monitor/config.json

Configuration Options

{
  "refresh_rate": 1.0,
  "max_history_points": 100,
  "temperature_thresholds": {
    "warning": 70,
    "critical": 80
  },
  "display": {
    "show_gpu": true,
    "show_network": false,
    "graph_height": 8,
    "graph_length": 100
  },
  "colors": {
    "normal": "green",
    "warning": "yellow", 
    "critical": "red"
  }
}

For detailed configuration options, see docs/CONFIGURATION.md.

๐Ÿ”จ Development

Development Setup

# Clone repository
git clone https://github.com/bkocis/system-monitor-cli-app.git
cd system-monitor-cli-app

# Set up development environment
make dev-setup
source venv/bin/activate

# Install development dependencies
make install-dev

Available Make Commands

make help              # Show available commands
make install          # Install package in development mode
make install-dev      # Install with development dependencies
make test             # Run test suite
make test-coverage    # Run tests with coverage report
make lint             # Run linting tools (ruff)
make format           # Format code (ruff)
make clean            # Clean build artifacts
make run              # Run the dashboard
make build            # Build distribution packages

Running Tests

# Run all tests
make test

# Run with coverage
make test-coverage

# Run specific test file
pytest tests/test_dashboard.py

Code Quality

# Format code
make format

# Check code quality (linting and type checking)
make lint

# Check formatting without making changes
make format-check

๐Ÿ“ Project Structure

system-monitor-cli-app/
โ”œโ”€โ”€ src/system_monitor/        # Main package
โ”‚   โ”œโ”€โ”€ __init__.py           # Package initialization
โ”‚   โ”œโ”€โ”€ main.py               # CLI entry point
โ”‚   โ”œโ”€โ”€ dashboard.py          # Core dashboard logic
โ”‚   โ””โ”€โ”€ config.py             # Configuration management
โ”œโ”€โ”€ tests/                    # Test suite
โ”‚   โ”œโ”€โ”€ test_dashboard.py     # Dashboard tests
โ”‚   โ””โ”€โ”€ test_config.py        # Configuration tests
โ”œโ”€โ”€ scripts/                  # Shell scripts
โ”‚   โ”œโ”€โ”€ run_dashboard.sh      # Main launcher
โ”‚   โ””โ”€โ”€ monitoring_terms.sh   # Terminal launcher
โ”œโ”€โ”€ config/                   # Configuration files
โ”‚   โ””โ”€โ”€ default.json          # Default configuration
โ”œโ”€โ”€ docs/                     # Documentation
โ”‚   โ”œโ”€โ”€ CONFIGURATION.md      # Configuration guide
โ”‚   โ””โ”€โ”€ DEVELOPMENT.md        # Development guide
โ”œโ”€โ”€ requirements.txt          # Production dependencies
โ”œโ”€โ”€ requirements-dev.txt      # Development dependencies
โ”œโ”€โ”€ pyproject.toml           # Modern packaging config
โ”œโ”€โ”€ setup.py                 # Package setup
โ”œโ”€โ”€ Makefile                 # Development automation
โ””โ”€โ”€ CHANGELOG.md             # Version history

๐ŸŽฏ Use Cases

๐Ÿ”ฅ System Performance Monitoring

  • Monitor system health during intensive tasks
  • Track temperature trends during gaming or rendering
  • Identify resource bottlenecks in real-time

๐ŸŽฎ Gaming & Content Creation

  • Keep eye on GPU temperatures during gaming sessions
  • Monitor VRAM usage for optimal game settings
  • Track power consumption for efficiency optimization

๐Ÿ–ฅ๏ธ Server Administration

  • Monitor headless servers via SSH
  • Track resource usage trends over time
  • Quick system health checks

๐Ÿ”ง Development & Testing

  • Monitor resource usage during builds/tests
  • Profile application performance impact
  • Debug memory leaks and CPU spikes

โšก Overclocking & Tuning

  • Monitor temperatures during stress testing
  • Track performance metrics after hardware changes
  • Validate cooling solutions effectiveness

๐ŸŽจ Visual Features

Temperature Graphs

  • Real-time ASCII graphs showing temperature trends
  • Color coding: Green (cool), Yellow (warm), Red (hot)
  • Historical data with min/max temperature display
  • Adaptive scaling based on temperature range

Color-Coded Metrics

  • Green: Normal operation (< 50% usage, configurable temperature)
  • Yellow: Moderate load (50-75% usage, warning temperature)
  • Red: High load/temperature (> 75% usage, critical temperature)

๐Ÿ› ๏ธ Troubleshooting

GPU Not Detected

# Check NVIDIA drivers
nvidia-smi

# Install nvidia-utils if missing
sudo apt install nvidia-utils-*

Temperature Sensors Not Working

# Detect sensors
sudo sensors-detect --auto

# Test sensors
sensors

Configuration Issues

# Reset to default configuration
rm ~/.config/system-monitor/config.json
# Will recreate on next run

# Validate JSON configuration
python -c "import json; json.load(open('~/.config/system-monitor/config.json'))"

Installation Issues

# Clean installation
make clean
pip uninstall system-monitor-cli
pip install -e .

# Development environment reset
rm -rf venv
make dev-setup

Permission Issues

# Make scripts executable
chmod +x scripts/run_dashboard.sh scripts/monitoring_terms.sh

๐Ÿ” Technical Details

Architecture

  • Python 3.12 with modern packaging standards
  • Rich library for terminal UI rendering
  • psutil for cross-platform system metrics
  • JSON configuration with user-friendly defaults
  • Modular design with separate concerns

Performance

  • Minimal CPU overhead (~1-2% CPU usage)
  • Memory efficient (~10-20MB RAM usage)
  • Configurable refresh rate (default: 1 second)
  • Adaptive terminal sizing for different screen sizes

Data Collection

  • CPU: psutil.cpu_percent() and sensors command
  • GPU: nvidia-smi and nvidia-settings integration
  • Memory: psutil.virtual_memory() and psutil.swap_memory()
  • Disk: psutil.disk_usage() with intelligent filtering
  • Temperature: Hardware sensor integration with configurable history

Testing

  • Comprehensive test suite with >90% coverage
  • Unit tests for all major components
  • Mocked external dependencies for reliable testing
  • Continuous integration ready

๐Ÿ“ฆ Distribution

Building Packages

# Build wheel and source distribution
make build

# Files created in dist/
ls dist/
# system_monitor_cli-1.0.0-py3-none-any.whl
# system_monitor_cli-1.0.0.tar.gz

Installing from Source

# Install from local directory
pip install .

# Install in development mode
pip install -e .

# Install with development dependencies
pip install -e ".[dev]"

๐Ÿ“ License

This project is open source under the MIT License. Feel free to modify and distribute according to your needs.

๐Ÿค Contributing

Contributions are welcome! Please see docs/DEVELOPMENT.md for detailed development guidelines.

Areas for Improvement

  • Support for AMD GPUs
  • Additional sensor types
  • Network monitoring features
  • Export/logging capabilities
  • Windows/macOS support

Development Workflow

  1. Fork the repository
  2. Create a feature branch
  3. Write tests for new features
  4. Ensure code quality (make lint)
  5. Submit a pull request

Reporting Issues

Please report bugs and feature requests on GitHub Issues.

๐Ÿ”— Links


Created by Balaz Kocis | Professional System Monitoring for the Terminal

About

System monitor graphical CLI app /cpu/gpu/temp/drive usage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published