powermetrics
Gather and display CPU usage, power, and interrupt wakeup statistics. tldr-pages
On macOS
macOS
Display CPU, power, and wakeup metrics using the default 5-second sample interval
sudo powermetricsIdentifySample metrics every 2000 milliseconds taking 10 samples then exit
sudo powermetrics --sample-rate 2000 --sample-count 10IdentifySave output to a file instead of stdout
sudo powermetrics --output-file path/to/output.txtIdentifyOrder the process list by the specified method (default: composite)
sudo powermetrics --order pidIdentifyDisplay output in machine-readable property list format and print a usage summary on exit
sudo powermetrics --format plist --show-usage-summaryIdentify