This Prometheus exporter exposes metrics from the System Management Controller (SMC) on Apple Silicon Macs. It provides information about fan speeds and various temperature sensors.
Despite the System Management Controller (SMC) hardware being exclusive to Intel Macs, the API retains the same name, and this project adheres to that convention.
- Exposes fan metrics:
- Fan count
- Maximum fan speed
- Minimum fan speed
- Actual fan speed
- Target fan speed
- Exposes temperature metrics from numerous sensors
- Clone the repository:
git clone https://github.com/AdeshAtole/smc-exporter.git
- Navigate to the project directory:
cd smc-exporter
- Build the exporter:
go build
Run the exporter:
./smc-exporter
By default, the exporter listens on :9259
and exposes metrics at /metrics
.
--web.listen-address
: The address to listen on for HTTP requests (default: ":9259")--web.telemetry-path
: Path under which to expose metrics (default: "/metrics")
The exporter provides the following metrics:
smc_fan_count
: Number of fanssmc_max_fan_speed_rpm
: Maximum fan speed in RPMsmc_min_fan_speed_rpm
: Minimum fan speed in RPMsmc_target_fan_speed_rpm
: Target fan speed in RPMsmc_actual_fan_speed_rpm
: Actual fan speed in RPMsmc_temp_*
: Various temperature sensors (e.g.,smc_temp_TCMB
,smc_temp_TA0P
, etc.)
Add the following to your prometheus.yml
:
scrape_configs:
- job_name: 'smc'
static_configs:
- targets: ['localhost:9259']
This exporter uses the gosmc to interact with the SMC.
Thanks to stats and hackers around the internet for the SMC keys.