3 ms·
There's no default utility for this. There's some sysctl values for the CPU and the GPU but they don't actually give you a temperature. There's an API for this
by burke 10y ago
There's no default utility for this. There's some sysctl values for the CPU and the GPU but they don't actually give you a temperature.
There's an API for this in IOKit. Easiest way I've found to get at it on the CLI is:
gem install istats
istats cpu temp | awk '{gsub(/[^0-9\.]/,"",$3);print $3}'
- DigitalJack 10y agoI installed Intel Power Gadget. It's pretty nice actually, no options to configure but it's pretty useful information.
- grkvlt 10y agoJust FYI, I had to do the following: $ gem install istats ERROR: Could not find a valid gem 'istats' (>= 0) in any repository ERROR: Possible alternatives: iStats $ gem install iStats Fetching: sparkr-0.4.1.gem (100%) ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory. $ sudo gem install iStats Fetching: sparkr-0.4.1.gem (100%) Successfully installed sparkr-0.4.1 [...] This could take a while... Then, I discovered it uses sparklines for output: $ istats cpu CPU temp: 60.625°C Which is pretty cool. EDIT: the sparkline doesn't show here, but it's a little bar-chart histogram