This is a useful built-in command for checking hardware metrics, especially CPU temperature.
sudo powermetrics
[…]
**** SMC sensors ****
CPU Thermal level: 99
GPU Thermal level: 50
IO Thermal level: 50
Fan: 5219.96 rpm
CPU die temperature: 57.20 C
GPU die temperature: 35.00 C
CPU Plimit: 0.00
GPU Plimit (Int): 0.00
Number of prochots: 0
See:
- AskDifferent/StackExchange: Can I get the CPU temperature and fan speed from the command line in OS X?