Skip to content

forjasystems-bhm/monitor-linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ–ฅ๏ธ CyberMonitor - Linux System Monitor

Python Platform License Status

Real-time system monitoring tool with professional DevOps aesthetics

Features โ€ข Installation โ€ข Usage โ€ข Autostart โ€ข Screenshots


๐ŸŽฏ Features

  • โœจ Real-time monitoring: CPU, RAM, SWAP, GPU, Disk usage and temperatures
  • ๐ŸŽจ Cyber/DevOps aesthetic: Professional terminal-style interface
  • โšก Lightweight: Low resource consumption (~0.5% CPU, ~30MB RAM)
  • ๐Ÿ”„ Auto-refresh: Updates every 1.5 seconds
  • ๐Ÿ“Š ASCII progress bars: Visual representation of metrics
  • ๐ŸŽจ Color-coded alerts: Green โ†’ Yellow โ†’ Red based on usage
  • ๐ŸชŸ Normal window behavior: Minimizable and doesn't block other windows
  • ๐Ÿš€ Auto-start support: Run on system boot

๐Ÿ“‹ Requirements

  • OS: Linux (Debian/Ubuntu based distros, Arch, Fedora, etc.)
  • Python: 3.8 or higher
  • Dependencies:
    • python3-tk (Tkinter)
    • psutil (System monitoring)
    • lm-sensors (Temperature sensors)

๐Ÿš€ Installation

1. Clone the repository

git clone https://github.com/BRUNO1993-CIBER/monitor-linux.git
cd monitor-linux

2. Install system dependencies

Debian/Ubuntu:

sudo apt update
sudo apt install python3-tk python3-venv lm-sensors

Arch Linux:

sudo pacman -S tk python-pip lm_sensors

Fedora:

sudo dnf install python3-tkinter lm_sensors

3. Configure sensors (first time only)

sudo sensors-detect
# Press ENTER to accept all defaults

4. Create virtual environment and install Python dependencies

python3 -m venv .venv
source .venv/bin/activate
pip install psutil

5. Run the monitor

python3 mini_conky.py

๐ŸŽฎ Usage

Running manually

# Navigate to project directory
cd /path/to/monitor-linux

# Activate virtual environment
source .venv/bin/activate

# Run in foreground
python3 mini_conky.py

# Or run in background
python3 mini_conky.py &

Stopping the monitor

pkill -f mini_conky.py

Check if running

ps aux | grep mini_conky.py

๐Ÿ”„ Autostart Configuration

Method 1: Desktop Entry (Recommended)

1. Create launcher script:

nano start_monitor.sh

Add this content:

#!/bin/bash
cd "/path/to/monitor-linux"
source .venv/bin/activate
python3 mini_conky.py &
deactivate

Make executable:

chmod +x start_monitor.sh

2. Create autostart entry:

mkdir -p ~/.config/autostart
nano ~/.config/autostart/cybermonitor.desktop

Add this content:

[Desktop Entry]
Type=Application
Name=CyberMonitor
Comment=System Monitor - DevOps Style
Exec=/path/to/monitor-linux/start_monitor.sh
Terminal=false
Hidden=false
X-GNOME-Autostart-enabled=true
StartupNotify=false
Categories=Utility;System;

Replace /path/to/monitor-linux/ with your actual path!


Method 2: Systemd User Service (Advanced)

mkdir -p ~/.config/systemd/user
nano ~/.config/systemd/user/cybermonitor.service

Add this content:

[Unit]
Description=CyberMonitor System Monitor
After=graphical-session.target

[Service]
Type=forking
WorkingDirectory=/path/to/monitor-linux
ExecStart=/bin/bash -c 'source .venv/bin/activate && python3 mini_conky.py &'
Restart=on-failure
RestartSec=5
Environment=DISPLAY=:0
Environment=XAUTHORITY=%h/.Xauthority

[Install]
WantedBy=default.target

Enable and start:

systemctl --user daemon-reload
systemctl --user enable cybermonitor.service
systemctl --user start cybermonitor.service

# Check status
systemctl --user status cybermonitor.service

๐ŸŽจ Customization

Edit mini_conky.py to customize:

Colors

self.bg_color = "#0a0e27"      # Background
self.fg_primary = "#00ff41"     # Primary (green)
self.fg_secondary = "#00d9ff"   # Secondary (cyan)
self.fg_warning = "#ffaa00"     # Warning (orange)
self.fg_danger = "#ff3366"      # Danger (red)

Window Size

self.width = 280   # Width in pixels
self.height = 200  # Height in pixels

Update Interval

self.root.after(1500, self.update_stats)  # 1500ms = 1.5 seconds

๐Ÿ“Š Monitored Metrics

Metric Description Color Coding
CPU Total CPU usage percentage Green < 50% < Yellow < 75% < Red
TEMP CPU temperature (ยฐC) Based on temperature value
RAM Memory usage with amount used Green < 50% < Yellow < 75% < Red
SWAP Swap memory usage Green < 50% < Yellow < 75% < Red
GPU GPU temperature if available Based on temperature value
DISK Root partition (/) usage Green < 50% < Yellow < 75% < Red

๐Ÿ› Troubleshooting

Temperatures show "N/A"

# Reconfigure sensors
sudo sensors-detect
sensors  # Check if temperatures are detected

NVIDIA GPU temperature not showing

sudo apt install nvidia-smi  # For NVIDIA GPUs

AMD GPU temperature not showing

# Install amdgpu drivers and ensure lm-sensors detects them
sensors

Monitor not starting on boot

# Check autostart file exists
ls -la ~/.config/autostart/cybermonitor.desktop

# Check script permissions
ls -la /path/to/monitor-linux/start_monitor.sh

# Test script manually
/path/to/monitor-linux/start_monitor.sh

High CPU usage

# Increase update interval in mini_conky.py
# Change from 1500 to 3000 (3 seconds)
self.root.after(3000, self.update_stats)

๐Ÿ› ๏ธ Tech Stack

  • Language: Python 3.8+
  • GUI Framework: Tkinter
  • System Monitoring: psutil
  • Temperature Reading: lm-sensors
  • Font: JetBrains Mono (falls back to monospace)

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ‘ค Author

Bruno


๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

โญ Star History

If you find this project useful, please consider giving it a star! โญ


Made with โค๏ธ for the Linux community

About

Real-time system monitoring tool with professional DevOps aesthetics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages