Dragos Strugar
Dragos Strugar

Reputation: 1644

macOS get GPU history (usage) from terminal

In recent versions of Activity Monitor, one can press CMD+4 and get a graphical representation of GPU usage. However, I want to obtain this info from my native macOS app and therefore I'm searching for a way to get this data (shown in Activity Monitor) from macOS command line.

Activity Monitor GPU History Info on macOS

Upvotes: 12

Views: 15413

Answers (1)

Pierz
Pierz

Reputation: 8118

You can obtain information about the GPU usage using the built-in powermetrics command e.g to obtain one snapshot (-n1) over 0.5 sec (-i500 ms) of the GPU info (--samplers gpu_power):

sudo powermetrics --samplers gpu_power -i500 -n1

Note: You can check which samplers powermetrics supports by typing:

powermetrics -h

Upvotes: 19

Related Questions