m1_temperature_sensor/readme.md
yifan wang 8f36d3ffa7 init
2020-11-28 00:15:40 -05:00

34 lines
933 B
Markdown

# 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
For better name for the sensors, please refer to
https://github.com/exelban/stats/blob/master/Modules/Sensors/values.swift
https://github.com/acidanthera/VirtualSMC/blob/master/Docs/SMCSensorKeys.txt
Similar code for getting sensor values using IOKit (for intel Mac)
https://github.com/exelban/stats/blob/master/Modules/Sensors/values.swift
## screen shot and screen record
![screen record](screen record.mp4)
![screen shot](screen shot.png)