m1_temperature_sensor/readme.md

45 lines
1.3 KiB
Markdown
Raw Normal View History

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
## screen shot and screen record
2020-11-28 15:12:10 +00:00
- screen record ->screen_record.mp4[1.4MB]
2020-11-28 15:10:19 +00:00
![screen record](https://raw.githubusercontent.com/fermion-star/apple_sensors/master/screen_record.mp4)
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