Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

check macbook pro temperature by terminal

Hi there,
maybe here i can find some answers to my request posted here:

http://discussions.apple.com/thread.jspa?threadID=2671272&tstart=0

" i am using a macbook pro 5,5 and i want to check the temperature by using my terminal (not using graphical apps).
I think it is possible with "ioreg" command but i cant find anythig on the web that helps me.
Please can you help me?
In any case have i to use an apple script? "

Thank you.

Filippo

MacBook Pro 5.5, Mac OS X (10.6.5)

Posted on Dec 8, 2010 1:12 AM

Reply
34 replies

Jan 12, 2011 5:47 PM in response to filippo1982

filippo1982, are you asking whether there is a built-in command in a shell that will provide the temperature, or are you asking whether there is a command-line executable that comes with Mac OS X that will provide the temperature?

If you are asking about a built-in shell command, then the answer is definitely no; none of the shells provide temperature information. If you are asking about a command-line executable that comes with Mac OS X (i.e. a version that is supported on a MacBookPro5,5), then the answer so far also appears to be no, since the ioreg command doesn’t provide temperature information on a MacBookPro5,5.

Aug 27, 2014 11:27 AM in response to VikingOSX

I tried to install and got this in the terminal (OS10.9.4, MacPro6,1):


Fetching: sparkr-0.4.1.gem (100%)

Successfully installed sparkr-0.4.1

Fetching: iStats-0.0.9.gem (100%)

Building native extensions. This could take a while...

ERROR: Error installing iStats:

ERROR: Failed to build gem native extension.


/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb

mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/rub y.h



Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/iStats-0.0.9 for inspection.

Results logged to /Library/Ruby/Gems/2.0.0/gems/iStats-0.0.9/ext/osx_stats/gem_make.out

Aug 27, 2014 1:41 PM in response to kmontgomery

I am using OS X 10.9.4. Recent Apple compiler technology. Apple supplied Ruby version is 2.0.0p451. Do you have all of these ingredients.


sudo gem install iStats


When I installed iStats v0.0.9, I had just downloaded the Command Line Tools (OS X 10.9) for Xcode Late July 2014 (Jul 21.). I just removed this version of iStat (sudo gem uninstall iStats), and then reinstalled it with the same release of command line tools. This is my output, which I expected, and it still functions normally when run:


odin: ~$ sudo gem install iStats

Fetching: iStats-0.0.9.gem (100%)

Building native extensions. This could take a while...

Successfully installed iStats-0.0.9

Parsing documentation for iStats-0.0.9

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-0.0.9

1 gem installed


Removing iStats gem again, I updated to the Command Line Tools (OS X 10.9) for Xcode Late August (Aug 18). The reinstallation process of iStats v0.0.9 produced identical output to the above, and a working iStats application.


Using the Ruby Version Manager (RVM) and Ruby v2.1.2, the gem installation was even cleaner:


odin: ~$ gem install iStats

Building native extensions. This could take a while...

Successfully installed iStats-0.0.9

Parsing documentation for iStats-0.0.9

Done installing documentation for iStats after 0 seconds

1 gem installed

Aug 28, 2014 6:58 AM in response to kmontgomery

Hi kmontgomery,

I had the same issue as you.

The issue was solved by installing xcode tools

$ xcode-select --install

Accepting the xcode licence

$ xcodebuild --license

and running the fix outlined in the readme

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install iStats

The software works brilliantly, thank you developers for doing such a great job! 😀

Nov 8, 2014 9:12 PM in response to brickhead248

That's what 'ioreg' is for, io registers like fan control. However, that ability has been removed, suspect. Be discerning when software accesses your hardware. iStats is licensed, closed. smcFanControl uses IOKit which passes memory structures to functions that read/write a bigger memory structure, i.e. 'registry':

http://www.opensource.apple.com/source/IOKitUser/IOKitUser-388.2/iodisplayregist ry.c

https://developer.apple.com/library/mac/Documentation/IOKit/Reference/IOKitLib_h eader_reference/index.html

Very insecure, accesses mach kernel master port, reading all process memory structures, and everything else it can. Accesses system files too. Until ioreg is fixed, we need to find a better way. That's how bad the espionage got, 2014.

Jan 10, 2015 4:29 PM in response to brickhead248

brickhead248 wrote:


Hi kmontgomery,

I had the same issue as you.

The issue was solved by installing xcode tools

$ xcode-select --install

Accepting the xcode licence

$ xcodebuild --license

and running the fix outlined in the readme

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install iStats

The software works brilliantly, thank you developers for doing such a great job! 😀

Thanks for that - this helped me... except for one small correction:


sudo xcodebuild -license


Somewhat unconventionally, Xcode's long opts format uses only a single dash. :-)

check macbook pro temperature by terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.