Skip to content

Instantly share code, notes, and snippets.

View beltex's full-sized avatar

Omeed beltex

View GitHub Profile
@beltex
beltex / powermetrics.d
Last active January 16, 2024 09:26
Read SMC keys that Apple's powermetrics tool uses. Requires OS X 10.10
/*******************************************************************************
WHAT: Read SMC keys that Apple's powermetrics tool uses. Requires OS X 10.10
RUN: sudo dtrace -qCs powermetrics.d -c 'powermetrics --sampler smc -n 1'
DETAIL: This lets us see what hardware components/functions they map to.
LICENSE: MIT
AUTHOR: beltex <http://beltex.github.io>
REFERENCES:
- Advanced Mac OS X Programming: The Big Nerd Ranch Guide