Skip to content

Latest commit

Β 

History

History
81 lines (63 loc) Β· 3 KB

File metadata and controls

81 lines (63 loc) Β· 3 KB

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