narugit / smctemp

Print CPU temperature of macOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

M2 CPU temperature

lodenrogue opened this issue · comments

I came across your repo because on M2 I can't run sudo powermetrics --samplers smc | grep -i "CPU die temperature" to get CPU temperature. I'm not too familiar with C++ but I have a strong programming background. Can you guide me on the process for getting this from the hardware?

I'm looking at the code but I'm having some trouble understanding exactly what's happening. I think this is where it's getting the temp in the code: https://github.com/narugit/smctemp/blob/9b9f73bd7c503f048dfac2bedc917ccefc942d47/smctemp.cc#LL368C25-L368C25