Create a solution to monitor the temperature sensors of Apple Silicon M1 and M2 chips, as the standard powermetrics
utility is not available for Apple Silicon chips.
(Note: Command to get Apple Intel chip temperature: sudo powermetrics --samplers smc |grep -i "CPU die temperature"
.)
- Install
Homebrew
,Python 3
, andGCC
with the following:bash dependencies.sh
- This python code continuously monitors the CPU temperature (specifically the cpu die temps), simulates device under heavy CPU load, and calculates sensor readings for temperature data.
(from here: https:/fermion-star/apple_sensors)
This Objective-C code's purpose is to retrieve and monitor sensor values, specifically power and thermal data, from Apple devices using HID services and events.
-
Retrieves and monitors power and thermal data from Apple devices using HID services and events.
-
Includes functions for interacting with HID services, obtaining product names, and retrieving sensor values.
- Only need to execute the
cpu_temp_and_stress_test.py
, with the following:python3 cpu_temp_and_stress_test.py
- To stop, press
CTRL + C
.
- (Note: Script will automatically stop after 10 minutes)
- Break down python code to be more modular.
- Do more research on how to have compiled executables ready to use without having to install
GCC
when running tests on a Apple Silicon chips. - Error handling, logging, and automated testing.