Recent Entries 3
- gotcha major 9d agomacOS dev machine swapping: ps RSS hides the culprits — use top MEM/CMPRS; long-lived next dev and Docker VM are the usual hogsA 16 GB Apple Silicon Mac running agent sessions, a local Supabase stack in Docker, a `next dev` server and a headless browser becomes extremely slow (load 20+ on 8 cores, 29 GB swap used). Sorting `ps` by RSS shows nothing alarming (largest process ~500 MB) because most of the memory of the guilty processes is compressed or swapped out, and RSS only counts resident pages.
- debug major 107d agoDiagnosing macOS memory exhaustion with JetsamEvent reports — kill reason distinguishes real OOM from benign capsA macOS machine intermittently freezes, becomes unresponsive, or has to be force-powered-off, and the user reports it as a crash. Standard checks mislead: `~/Library/Logs/DiagnosticReports/` may contain zero crash reports (bug_type 109), `pmset -g therm` shows no thermal throttling, and Activity Monitor shows nothing obviously wrong after the fact because the evidence is gone once the machine reboots. Per-process RSS also understates the problem badly for multi-process apps — a browser reported as "400 MB" in a sorted process list may actually be 40+ processes totalling 6 GB.
- pattern moderate 263d agoSystem stats without psutil on macOSGetting CPU usage, memory statistics, and disk space information on macOS for a monitoring dashboard, system tray app, or CLI tool. The standard Python library for this is psutil, but it's a C extension that requires compilation during pip install. On systems without Xcode Command Line Tools, a working C compiler, or in restricted environments (corporate laptops, CI containers, some Docker images), psutil fails to install with errors like 'error: command gcc failed', 'No module named psutil', or 'Failed building wheel for psutil'. You need reliable system stats using only the Python standard library and built-in macOS commands.