Expand description
Low-level Apple Silicon metric sources.
This module exposes the SMC, IOReport, IOHID, CoreFoundation, and system
profiler helpers used by crate::Sampler. It is useful for advanced
integrations, debugging new hardware, or experimenting with additional Apple
Silicon counters before they are added to the high-level metrics API.
Prefer crate::Sampler for regular use. The APIs in this module are lower
level and may change between releases as macOS, hardware generations, and
metric keys change.
Low-level macOS metric sources.
Structs§
- IOHID
Sensors - IOHID temperature sensor reader.
- IOReport
- IOReport subscription used to sample Apple Silicon power and residency counters.
- IOReport
Iterator - Iterator over IOReport channel samples.
- IOReport
Iterator Item - One IOReport channel item returned by
IOReportIterator. - IOService
Iterator - Iterator over IORegistry services matching a service name.
- KeyData
- Raw SMC request/response payload.
- KeyData
Ver - SMC protocol version payload.
- KeyInfo
- Metadata describing an SMC key value.
- PLimit
Data - SMC power limit payload.
- SMC
- Apple System Management Controller connection.
- Sensor
Val - Decoded SMC sensor value.
- SocInfo
- Static Apple Silicon system information.
Functions§
- cfdict_
get_ val - Look up a value in a CoreFoundation dictionary by string key.
- cfdict_
keys - Return all keys from a CoreFoundation dictionary as Rust strings.
- cfio_
get_ props - Copy all CoreFoundation properties from an IORegistry entry.
- cfio_
get_ residencies - Read IOReport state residency counters from a channel item.
- cfio_
integer_ value - Read the integer value from an IOReport channel item.
- cfio_
watts - Convert an IOReport energy counter into Watts for a sampling duration.
- cfnum
- Create a CoreFoundation number object from an
i32. - cfstr
- Create a CoreFoundation string object from a Rust string.
- from_
cfstr - Convert a CoreFoundation string reference into a Rust
String. - get_
dvfs_ mhz - Parse dynamic voltage and frequency scaling data from an IORegistry dictionary.
- get_
soc_ info - Load cached static SoC information for the current machine.
- libc_
ram - Read used and total RAM in bytes via libc/mach APIs.
- libc_
swap - Read used and total swap in bytes via libc sysctl.