OSX: Command line tool for temperatures and fan sensors

root's picture

You have a bunch of applications designed to show you temperatures and fan speeds in graphical environment. Some are free but most of them are paid.
But what happens if you need something in command line? Well, it is even better because you can find many free powerful tools.
One of them is iStats. Below you will learn how to install and use it.

Install iStats via gem - be careful, it is case sensitive:

mini:~ osx$ [color=green]sudo gem install iStats[/color]
Fetching: sparkr-0.4.1.gem (100%)
Successfully installed sparkr-0.4.1
Fetching: parseconfig-1.0.6.gem (100%)
Successfully installed parseconfig-1.0.6
Fetching: iStats-1.2.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed iStats-1.2.0
Parsing documentation for sparkr-0.4.1
Installing ri documentation for sparkr-0.4.1
Parsing documentation for parseconfig-1.0.6
Installing ri documentation for parseconfig-1.0.6
Parsing documentation for iStats-1.2.0
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for ext/osx_stats/osx_stats.bundle, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for ext/osx_stats/smc.o, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/osx_stats.bundle, skipping
Installing ri documentation for iStats-1.2.0
3 gems installed

Now you have it!

mini:~ osx$ [color=green]istats[/color]
--- CPU Stats ---
CPU temp: 54.0°C  ▁▂▃▅▆▇

--- Fan Stats ---
Total fans in system: 1
Fan 0 speed: 1799.0 RPM  ▁▂▃▅▆▇

--- Battery Stats ---
Battery health: unknown
Cycle count: unknown
Current charge:   mAh  100%
Maximum charge:   mAh ▁▂▃▅▆▇  NaN%
Design capacity:  mAh
Battery temp: 0.0°C  

For more stats run `istats extra` and follow the instructions.

If you want to go deeper and have more information displayed, you can do as suggested and type "istats extra", which will tell you to execute "istats scan" in order to have some extra :)

mini:~ osx$ istats extra
Looks like you don't have any extra keys enabled. 
Run `istats scan` for the initial scan or `istats --help` for more info.
mini:~ osx$ istats scan
No config file /Users/osx/.iStats/sensors.conf found .. Run scan
Scanning keys...

Tp0C Unknown  46.390625°C  ▁▂▃▅▆▇
Ts0G Unknown  49.0°C  ▁▂▃▅▆▇
Ts0S Memory Bank Proximity  35.453125°C  ▁▂▃▅▆▇
TA0p Ambient temperature  45.625°C  ▁▂▃▅▆▇
TA0P Ambient temperature  45.625°C  ▁▂▃▅▆▇
TA1p Ambient temperature  46.125°C  ▁▂▃▅▆▇
TA1P Ambient temperature  46.125°C  ▁▂▃▅▆▇
TCGc PECI GPU  64.0°C  ▁▂▃▅▆▇
TCGC PECI GPU  64.0°C  ▁▂▃▅▆▇
TCPG   103.0°C  ▁▂▃▅▆▇
TCSc PECI SA  63.0°C  ▁▂▃▅▆▇
TCSC PECI SA  63.0°C  ▁▂▃▅▆▇
TCTD Unknown  0.109375°C  ▁▂▃▅▆▇
TCXc PECI CPU  65.234375°C  ▁▂▃▅▆▇
TCXr Unknown  -39.765625°C  ▁▂▃▅▆▇
TCXC PECI CPU  65.234375°C  ▁▂▃▅▆▇
TC0c   64.0°C  ▁▂▃▅▆▇
TC0d   62.875°C  ▁▂▃▅▆▇
TC0p   56.625°C  ▁▂▃▅▆▇
TC0C CPU 0 Core  64.0°C  ▁▂▃▅▆▇
TC0D CPU 0 Die  62.875°C  ▁▂▃▅▆▇
TC0E CPU 0 ??  60.953125°C  ▁▂▃▅▆▇
TC0F CPU 0 ??  64.3125°C  ▁▂▃▅▆▇
TC0G CPU 0 ??  99.0°C  ▁▂▃▅▆▇
TC0J CPU 0 ??  2.296875°C  ▁▂▃▅▆▇
TC0P CPU 0 Proximity  56.625°C  ▁▂▃▅▆▇
TC1c   65.0°C  ▁▂▃▅▆▇
TC1C Core 1  65.0°C  ▁▂▃▅▆▇
TC2c   64.0°C  ▁▂▃▅▆▇
TC2C Core 2  64.0°C  ▁▂▃▅▆▇
TC3c   63.0°C  ▁▂▃▅▆▇
TC3C Core 3  63.0°C  ▁▂▃▅▆▇
TH0a Unknown  -127.0°C  ▁▂▃▅▆▇
TH0b Unknown  -127.0°C  ▁▂▃▅▆▇
TH0c Unknown  -127.0°C  ▁▂▃▅▆▇
TH0A Unknown  -127.0°C  ▁▂▃▅▆▇
TH0B Unknown  -127.0°C  ▁▂▃▅▆▇
TH0C Unknown  -127.0°C  ▁▂▃▅▆▇
TH0O Unknown  9.0°C  ▁▂▃▅▆▇
TH0X Unknown  -127.0°C  ▁▂▃▅▆▇
TH1a Unknown  -127.0°C  ▁▂▃▅▆▇
TH1b Unknown  -127.0°C  ▁▂▃▅▆▇
TH1c Unknown  -127.0°C  ▁▂▃▅▆▇
TH1A Unknown  -127.0°C  ▁▂▃▅▆▇
TH1B Unknown  -127.0°C  ▁▂▃▅▆▇
TH1C Unknown  -127.0°C  ▁▂▃▅▆▇
TH1O Unknown  9.0°C  ▁▂▃▅▆▇
TH1X Unknown  -127.0°C  ▁▂▃▅▆▇
TI0p Unknown  53.0°C  ▁▂▃▅▆▇
TI0P Unknown  53.0°C  ▁▂▃▅▆▇
TI1p Unknown  48.625°C  ▁▂▃▅▆▇
TI1P Unknown  48.625°C  ▁▂▃▅▆▇
TMBS Unknown  -127.0°C  ▁▂▃▅▆▇
TM0p Unknown  48.875°C  ▁▂▃▅▆▇
TM0P Memory Slot Proximity  48.875°C  ▁▂▃▅▆▇
TM0S Memory Slot 1  50.75°C  ▁▂▃▅▆▇
TPCD Platform Controller Hub Die  55.0°C  ▁▂▃▅▆▇
TP0p Unknown  55.375°C  ▁▂▃▅▆▇
TP0P Unknown  55.375°C  ▁▂▃▅▆▇
TW0p Unknown  43.375°C  ▁▂▃▅▆▇
TW0P AirPort Proximity  43.375°C  ▁▂▃▅▆▇

Done scanning keys.
All keys are disabled by default. Use `istats enable [key]` to enable specific keys or `istats enable all`.
The enabled sensors will show up when running `istats` or `istats extra`.

You will have in front of you a lot of sensors, some of them useless (do not know why they were detected but skipping on that). So, all you have to do now is to select whatever is relevant for you from the list and enable them.

I enabled the following - you may have them different, do not enable exactly what is below. It is only as example:

istats enable Ts0S
istats enable TA0p
istats enable TA0P
istats enable TA1p
istats enable TA1P
istats enable TCGc
istats enable TCGC
istats enable TC0C
istats enable TC0D
istats enable TC0P
istats enable TC1C
istats enable TC2C
istats enable TC3C
istats enable TM0P
istats enable TM0S
istats enable TPCD
istats enable TW0P

And now you will have more information:

mini:~ osx$ istats 
--- CPU Stats ---
CPU temp: 54.0°C  ▁▂▃▅▆▇

--- Fan Stats ---
Total fans in system: 1
Fan 0 speed: 1798.0 RPM  ▁▂▃▅▆▇

--- Battery Stats ---
Battery health: unknown
Cycle count: unknown
Current charge:   mAh  100%
Maximum charge:   mAh ▁▂▃▅▆▇  NaN%
Design capacity:  mAh
Battery temp: 0.0°C  

--- Extra Stats ---
Ts0S Memory Bank Proximity temp: 35.3°C  ▁▂▃▅▆▇
TA0p Ambient temperature temp: 44.5°C  ▁▂▃▅▆▇
TA0P Ambient temperature temp: 44.5°C  ▁▂▃▅▆▇
TA1p Ambient temperature temp: 44.88°C  ▁▂▃▅▆▇
TA1P Ambient temperature temp: 44.88°C  ▁▂▃▅▆▇
TCGc PECI GPU temp: 59.0°C  ▁▂▃▅▆▇
TCGC PECI GPU temp: 59.0°C  ▁▂▃▅▆▇
TC0C CPU 0 Core temp: 59.0°C  ▁▂▃▅▆▇
TC0D CPU 0 Die temp: 57.88°C  ▁▂▃▅▆▇
TC0P CPU 0 Proximity temp: 54.0°C  ▁▂▃▅▆▇
TC1C Core 1 temp: 60.0°C  ▁▂▃▅▆▇
TC2C Core 2 temp: 56.0°C  ▁▂▃▅▆▇
TC3C Core 3 temp: 58.0°C  ▁▂▃▅▆▇
TM0P Memory Slot Proximity temp: 48.63°C  ▁▂▃▅▆▇
TM0S Memory Slot 1 temp: 50.61°C  ▁▂▃▅▆▇
TPCD Platform Controller Hub Die temp: 51.0°C  ▁▂▃▅▆▇
TW0P AirPort Proximity temp: 41.63°C  ▁▂▃▅▆▇

Developer page of iStats: https://github.com/Chris911/iStats

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content