Powermetrics

Posted on
Mon Mar 13, 2023 4:51 am
siclark online
Posts: 1961
Joined: Jun 13, 2017
Location: UK

Powermetrics

Hi Karl,
I was wondering how you extract the temperature and CPU stats into the variables, and if you use powermeterics, would it be possible to also extract the Power usage of the Mac as well.

Code: Select all
 sudo powermetrics -i 1000 --samplers cpu_power,gpu_power -a --hide-cpu-duty-cycle --show-usage-summary --show-extra-power-info


I believe this works on both Intel and Apple silicon and would be useful to monitor the power consumption of our always on Macs.

example output

Code: Select all
*** Summary system activity (Mon Mar 13 10:46:28 2023 +0000) (105101.74ms elapsed) ***


**** Processor usage ****

Intel energy model derived package power (CPUs+GT+SA): 22.66W

Intel energy model derived CPU core power: 18.3W
Intel energy model derived GT power: 0.872W
Intel energy model derived DRAM power: 1.27W
LLC flushed residency: 5.59%

Posted on
Mon Mar 13, 2023 5:38 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Powermetrics

siclark wrote:
I believe this works on both Intel and Apple silicon and would be useful to monitor the power consumption of our always on Macs.

Neat. I can confirm this command works on an Intel MBP 2020 Core i5 and an M2 mini 2023 (both on Ventura).

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest