ofirgalcon / sysmetrics
Apple Silicon system metrics history for MunkiReport.
Requires
None
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Apple Silicon history collected by the com.github.munkireport.sysmetrics LaunchDaemon. This module reads /Library/MunkiReport/sysmetrics/sysmetrics.sqlite at check-in. It does not install the daemon.
Each check-in uploads samples newer than the last upload the server accepted, plus the previous two hours. The script asks the server whether that file arrived before it moves the watermark, so a failed or skipped upload is sent again on the next check-in, up to 15 days. A sample timestamped in the future is left out and cannot move the watermark. Numbers are short text, one sample per line. The local byte counters are not uploaded. The server keeps 15 days. Samples older than 3 days are stored as 15-minute averages. The graph holds each average across that interval. Deleting /Library/MunkiReport/sysmetrics/upload_state.json sends the saved history again.
Table schema
- id - big integer
- serial_number - string
- ts - unix time, unique with serial_number
- cpu_user, cpu_sys, cpu_idle - percent of the whole chip averaged over the previous ~5-minute sample interval (same window as disk/net rates and top_procs). The graph plots one point per sample; each CPU point is that interval average, not a ~1s snapshot. Empty on the first sample after boot, a gap longer than 10 minutes, or when the Mac woke inside the gap (that sample is dropped so rates are not inflated). Older collector builds stored a ~1-second sample instead.
- load_avg, load_avg_5, load_avg_15
- mem_used_pct - percent
- mem_used_mb, compressed_mb, swap_mb
- disk_r_bps, disk_w_bps, net_in_bps, net_out_bps - bytes per second
- gpu_busy - percent from a ~1-second powermetrics sample at collect time (a snapshot every ~5 minutes, not a 5-minute average). Package/CPU/GPU/ANE watts and thermal_pressure are the same kind of point sample.
- package_watts - CPU + GPU + Neural Engine watts
- cpu_watts, gpu_watts, ane_watts
- mem_pressure - memory pressure percentage, 0–100. Lower is better. This is 100 minus kern.memorystatus_level, the free percentage macOS reports.
- thermal_pressure - Nominal, Moderate, Heavy, Trapping, or Sleeping
- sample_count - snapshots represented by this row. A 5-minute sample is 1. A 15-minute average is the number of snapshots combined into it.
- top_procs - compact text for the previous ~5-minute interval:
d{elapsed}:c:name|cpu|mem;...#m:.... CPU is percent of one core from process CPU-time deltas (top 10 at or above 2%; the tab shows top 3); mem is physical footprint MB at the sample (top 3), summed across coalesced PIDs for the same display name.Foo Helperandcom.apple.WebKit.*are coalesced. Empty/NULLwhen the interval was not measured. Legacy unprefixedc:...rows are instantaneous elevated snapshots. Collector builds before 19 stored max classic RSS instead of summed footprint. 15-minute averages sum interval CPU-seconds; legacy-only buckets keep the busiest member sample.
Install
Install and enable the module, then run a managed client install so the preflight script is downloaded. Deploy the collector package separately. The client tab is System Metrics.
Collector (required on clients)
This module does not install the LaunchDaemon. Deploy the collector package separately:
- Source / build script: https://github.com/ofirgalcon/sysmetrics-collector
- Identifier:
com.github.munkireport.sysmetrics