Update: MacOS includes the in-built
powermetrics command line tool which allows for access to varity of performance and power info. e.g. to obtain running GPU info every 5 seconds:
sudo powermetrics --samplers gpu_power
To access all info (inluding temperatures for certain devices) run it without any arguments. Or to sample GPU usage for one iteration (
-n1 over say 200ms (
sudo powermetrics --samplers gpu_power -n1 -i200
The Intel Power Gadget also allows for monitoring of Intel GPUs, along with other measures of power usage for CPU, temperature, etc. It also has command line tools that provides for logging to a file.