2020-11-28 05:15:40 +00:00
# Temperature Sensor Monitor for Apple Silicon M1
- temp_sensor.m: A modified version of the [code ](https://github.com/freedomtan/sensors/blob/master/sensors/sensors.m ) for iOS sensor by [freedomtan ](https://github.com/freedomtan );
- monitor.cpp: A c++ wrapper of Objective-C output for monitoring temperature in the terminal.
## Usage
`./temp_sensor | ./monitor`
Only test with my Mac mini with M1. Please check your mac's `ioreg -lfx` output if needed.
## References
2020-11-28 05:32:25 +00:00
For better names (e.g. what is `PMU TP3w` ?) for the sensors, please refer to
2020-11-28 05:15:40 +00:00
https://github.com/exelban/stats/blob/master/Modules/Sensors/values.swift
https://github.com/acidanthera/VirtualSMC/blob/master/Docs/SMCSensorKeys.txt
2020-11-28 05:32:25 +00:00
Here is a similar code in swift for getting sensor values using IOKit (for intel Mac)
2020-11-28 05:15:40 +00:00
https://github.com/exelban/stats/blob/master/Modules/Sensors/values.swift
2020-11-28 05:32:25 +00:00
For intel Mac, an easier way to get sensor infomation:
`sudo powermetrics`
2020-11-28 05:15:40 +00:00
2020-11-28 17:04:58 +00:00
## Demo: screen shot and screen record
- screen record : screen_record.mp4[1.4MB] or
![screen record ](https://raw.githubusercontent.com/fermion-star/apple_sensors/master/screen_record.low.gif )
2020-11-28 05:15:40 +00:00
2020-11-28 15:12:10 +00:00
- screen shot
![screen shot ](https://raw.githubusercontent.com/fermion-star/apple_sensors/master/screen_shot.png )
2020-11-28 05:23:17 +00:00
<!-- -
2020-11-28 15:10:19 +00:00
![screen record ](screen_record.mp4 )
2020-11-28 05:15:40 +00:00
2020-11-28 15:10:19 +00:00
![screen shot ](screen_shot.png )
2020-11-28 05:23:17 +00:00
--->
2020-11-28 05:15:40 +00:00