Skip to content

norMNfan/sysmon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

sysmon

A terminal-based system monitor for Apple Silicon Macs running Ollama. Tracks RAM, swap, CPU, SSD usage, and installed Ollama models in a live-updating dashboard.

Python 3.10+ macOS

Screenshot

+----------------------------+------------------------------------------+
| 🧠 Memory          [12:34] | ⚙️  CPU                                   |
|  RAM Used  54.2 / 64 GB    |  Overall [████████████░░░░░░░░] 42.0%    |
|  RAM Free  9.8 GB          |  Core 0  [██████████░░░░░░░░░░] 31.2%    |
|  Swap Used 0.3 / 4.0 GB    |  Core 1  [███████████████░░░░░] 55.8%    |
|                            |  Core 2  [██████░░░░░░░░░░░░░░] 18.3%    |
+----------------------------+------------------------------------------+
| 💾 Storage                  | 🦙 Ollama — Installed Models             |
|  SSD Used  412 / 994 GB    |  llama3:70b      40 GB    ● RUNNING      |
|  SSD Free  582 GB          |  qwen2:32b       20 GB    ○ idle         |
|  Total Read   18204 MB     |  mistral:7b       4 GB    ○ idle         |
|  Total Write  12840 MB     |                                          |
+----------------------------+------------------------------------------+
| 📐 Model RAM Guide (Q4, Apple Silicon)                                |
|  7B .... 4.5 GB    ✅ fits 64GB                                       |
|  13B ... 8 GB      ✅ fits 64GB                                       |
|  70B ... 40 GB     ✅ fits 64GB                                       |
|  180B .. 110 GB    ❌ no                                              |
+-----------------------------------------------------------------------+

Features

  • Real-time RAM usage via vm_stat (matches Activity Monitor, not just psutil)
  • Per-core CPU utilization
  • SSD usage and cumulative I/O stats
  • Swap memory monitoring
  • Lists all installed Ollama models with running/idle status
  • Q4 quantization RAM guide for model sizing
  • Color-coded progress bars (green → yellow → red)
  • Refreshes every 2 seconds

Requirements

  • macOS on Apple Silicon
  • Python 3.10+
  • Ollama installed (optional — the monitor works without it)

Installation

pip install psutil rich

Usage

./sysmon.py

Or:

python3 sysmon.py

Press Ctrl+C to exit.

How It Works

Metric Source
RAM vm_stat + psutil (wired + active + compressor pages)
CPU psutil.cpu_percent(percpu=True)
Disk psutil.disk_usage + psutil.disk_io_counters
Swap psutil.swap_memory
Ollama models ollama list + ollama ps

RAM is calculated from vm_stat rather than relying solely on psutil to match what Activity Monitor reports on macOS.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages