Live Process Explorer & Resource Attribution Table #11
Notifications
Due Date
No due date set.
Blocks
Depends on
#12 Per-Process Thread, Socket & File Descriptor Inspection
gronod/MacMonitor
#16 Active Network Sockets & Connection Inspector
gronod/MacMonitor
Reference: gronod/MacMonitor#11
Reference in New Issue
Block a user
Resolved in Milestone 3. Implemented
MMProcessTelemetryProvider.h/.msampling all running processes viaproc_listpidsandPROC_PIDTASKALLINFO, computing CPU attribution %, resident and virtual memory, thread count, username resolution, and process termination. Verified with unit tests. Merged intodevelop.gronod referenced this issue2026-09-08 10:28:49 +01:00
gronod referenced this issue2026-09-08 10:29:08 +01:00
Technical Implementation Plan & Code Solution
1. High-Performance Process Collection Architecture
Enumerating hundreds of processes at 1–2 Hz requires minimal allocations and caching of static attributes (process name, icon, path). Dynamic attributes (CPU ticks, memory RSS, thread count) are updated continuously.
Key
libprocstructures used:proc_listpids(PROC_ALL_PIDS, 0, ...)proc_pidinfo(pid, PROC_PIDTASKINFO, ...)withstruct proc_taskinfoproc_pidpath(pid, ...)2. Objective-C Provider (
MMProcessCollector.m)3. Swift UI Process Table Integration
4. Performance Optimizations
name,path) in_processCacheavoids callingproc_pidpathrepeatedly on every tick.