4.8 KiB
4.8 KiB
Quick Start Guide
Installation
Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
Clone and Build
cd /home/snake/RustroverProjects/untitled
# Build everything
cargo build --release
# Or build individual components
cargo build --release -p procmon-tui # Terminal UI
cargo build --release -p procmon-gui # Graphical UI
Running the Applications
Terminal UI (Recommended for servers/SSH)
cargo run --release -p procmon-tui
Or run the compiled binary:
./target/release/procmon-tui
Graphical UI (Recommended for desktop)
cargo run --release -p procmon-gui
Or run the compiled binary:
./target/release/procmon-gui
First Time Setup
For best results, ensure the following packages are installed on your Linux system:
Ubuntu/Debian
sudo apt-get install lm-sensors build-essential
sudo sensors-detect --auto # Detect and configure thermal sensors
Arch Linux
sudo pacman -S lm_sensors base-devel
sudo sensors-detect --auto
Fedora/RHEL
sudo dnf install lm_sensors gcc
sudo sensors-detect --auto
TUI Quick Reference
Once the TUI is running:
-
Navigate Tabs
- Press
1for Dashboard (system overview) - Press
2for Processes (detailed process list) - Press
3for Network (network and disk I/O) - Press
4for Alerts (misbehavior alerts)
- Press
-
Process List Controls
↑/↓arrows to navigatesto cycle through sort columnsato toggle ascending/descendingfto filter by misbehaving processes
-
Exit
- Press
qorCtrl+Cto quit
- Press
GUI Quick Reference
The GUI uses tabs at the top:
- Dashboard: Overview with graphs and gauges
- Processes: Click column headers to sort
- Network & I/O: Real-time network and disk statistics
- Alerts: Color-coded alerts (Red=Critical, Yellow=Warning, Blue=Info)
Understanding the Alerts
The application automatically detects misbehaving processes:
-
Critical (Red): Immediate attention needed
- CPU usage > 95%
- Memory usage > 8GB
-
Warning (Yellow): Potential issues
- CPU > 80% for more than 60 seconds
- Memory > 2GB for more than 30 seconds
- High disk I/O (>100 MB/s for 60 seconds)
-
Info (Blue): Informational alerts
- Zombie processes
- Other noteworthy events
Monitoring Specific Metrics
CPU Monitoring
- Dashboard Tab: Shows overall CPU usage, per-core breakdown, and temperature
- Temperature: Reads from
/sys/class/thermal/or/sys/class/hwmon/
GPU Monitoring
- Currently supports AMD GPUs via sysfs (
/sys/class/drm/) - Shows GPU usage, VRAM, and temperature
- For NVIDIA GPUs, you may need to install additional drivers
Network Monitoring
- Network Tab: Shows all active network interfaces
- Statistics are cumulative since boot
- Includes packet counts and error rates
Disk I/O
- Network Tab: Shows per-device disk statistics
- Read/write operations and bytes transferred
- Filters out loop and ram devices for clarity
Process Details
- Processes Tab: Complete process information
- Click or select a process for details
- Sortable by CPU, Memory, Disk I/O, Name, or User
Performance Tips
-
Update Interval: Default is 1 second. This balances responsiveness with CPU usage.
-
Running as Root: Some metrics require root access:
sudo ./target/release/procmon-tui -
Filtering: Use the filter feature (
fin TUI) to focus on problematic processes -
Sorting: Sort by CPU or Memory to quickly identify resource hogs
Troubleshooting
No GPU Detected
- Check if
/sys/class/drm/exists:ls /sys/class/drm/ - Ensure GPU drivers are properly installed
- NVIDIA users may need additional work (see README)
No Temperature Readings
- Run
sensorscommand to check if thermal sensors are detected - Run
sudo sensors-detectto configure - Check permissions on
/sys/class/thermal/
Permission Denied Errors
- Some metrics require root access
- Try running with
sudo - Check that you can read
/proc/entries
High CPU Usage from Monitor
- This is unusual; the monitor should use <1% CPU
- Try increasing the update interval in the code
- Check for runaway processes being monitored
Next Steps
- Explore the codebase in
procmon-core/to customize detection rules - Modify alert thresholds in
procmon-core/src/detector.rs - Add custom monitoring logic to suit your needs
- Contribute improvements back to the project
Getting Help
If you encounter issues:
- Check the main README.md for detailed information
- Review system logs for errors
- Ensure all dependencies are installed
- Verify Rust toolchain is up to date:
rustup update
Enjoy monitoring your system!