filippo1982

Q: 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

Close

Q: check macbook pro temperature by terminal

  • All replies
  • Helpful answers

Previous Page 2 of 3 last Next
  • by filippo1982,

    filippo1982 filippo1982 Jan 12, 2011 12:20 PM in response to Baumkartoffel
    Level 1 (8 points)
    Jan 12, 2011 12:20 PM in response to Baumkartoffel
    Yes, this is what i am looking for, but you check it with "temp monitor"
    I am able to do that with "temperature monitor" :

    /Applications/TemperatureMonitor.app/Contents/MacOS/tempmonitor -c -l -a

    I would like to know if it's possible to check out the sensor without specific applications, but only using shell's command line's script!
  • by Baumkartoffel,

    Baumkartoffel Baumkartoffel Jan 12, 2011 5:47 PM in response to filippo1982
    Level 1 (140 points)
    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.
  • by filippo1982,

    filippo1982 filippo1982 Jan 13, 2011 7:36 AM in response to Baumkartoffel
    Level 1 (8 points)
    Jan 13, 2011 7:36 AM in response to Baumkartoffel
    Ok,
    that is what i was trying to understand!
    So there is not a a built-in shell command to check out the sensores temperrature!
    Thank you!

    Filippo
  • by MrHoffman,

    MrHoffman MrHoffman Jan 25, 2011 8:47 AM in response to filippo1982
    Level 6 (15,612 points)
    Mac OS X
    Jan 25, 2011 8:47 AM in response to filippo1982
    I cannot enter because membership costs 99$/year!


    [If you're not ready to join one of our developer programs, you can register as an Apple Developer for free|http://developer.apple.com/programs/which-program>.
  • by WarzauWynn,

    WarzauWynn WarzauWynn Feb 25, 2012 11:10 PM in response to Baumkartoffel
    Level 1 (0 points)
    Feb 25, 2012 11:10 PM in response to Baumkartoffel

    I came across this thread while looking for a CLI temperature monitor, and the last reply solved my problem.

     

    tempmonitor is also not dependent on any of the other resources from that app, so you can copy it out to wherever you want, which is very useful.

     

    FYI, I'm using OS 10.7.3 on an i7 MBA and it reads 11 sensors.  Awesome.

  • by hei-zen,

    hei-zen hei-zen Jun 22, 2013 5:13 PM in response to filippo1982
    Level 1 (0 points)
    Jun 22, 2013 5:13 PM in response to filippo1982

    Really disappointing that a.) there seems to be no "native" way of reading this simple values via command line (at least not openly documented in the Mac Developer Library) and b.) nobody seems to get the thread openers question

  • by etresoft,

    etresoft etresoft Jun 22, 2013 5:57 PM in response to hei-zen
    Level 7 (29,056 points)
    Jun 22, 2013 5:57 PM in response to hei-zen

    a) There is nothing "simple" about IOKit

    b) There are numerous, excellent answers in this thread from people who obviously understand this original poster's question

    c) This is from 2010

  • by ChrisND911,

    ChrisND911 ChrisND911 Apr 13, 2014 1:56 PM in response to filippo1982
    Level 1 (0 points)
    Apr 13, 2014 1:56 PM in response to filippo1982

    Just released this ruby gem that lets you see the CPU temperature via the command-line.

     

     

    https://github.com/Chris911/iStats

     

     

    gem install iStats
    
  • by bschellenberg,

    bschellenberg bschellenberg Jul 20, 2014 1:42 PM in response to ChrisND911
    Level 1 (5 points)
    Jul 20, 2014 1:42 PM in response to ChrisND911

    This is great. Thanks.

  • by VikingOSX,Helpful

    VikingOSX VikingOSX Jul 22, 2014 12:31 PM in response to filippo1982
    Level 7 (20,606 points)
    Mac OS X
    Jul 22, 2014 12:31 PM in response to filippo1982

    If you are running Mountain Lion or Mavericks, instead of Snow Leopard, the following may help.

     

    In terminal, install this Ruby gem:

     

    sudo gem install iStats

     

    You may get an unable to convert “xCA” message during the install, but it does not effect functionality.

     

    iStats -h or just iStats

     

    Output on 2014 MacBook Air (OS X 10.9.4)

     

    Screen Shot 2014-07-22 at 3.25.15 PM.png

  • by kmontgomery,

    kmontgomery kmontgomery Aug 27, 2014 11:27 AM in response to VikingOSX
    Level 1 (0 points)
    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

  • by VikingOSX,

    VikingOSX VikingOSX Aug 27, 2014 1:41 PM in response to kmontgomery
    Level 7 (20,606 points)
    Mac OS X
    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

  • by brickhead248,

    brickhead248 brickhead248 Aug 28, 2014 6:58 AM in response to kmontgomery
    Level 1 (0 points)
    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!

  • by dkim95120,

    dkim95120 dkim95120 Nov 8, 2014 9:12 PM in response to brickhead248
    Level 1 (0 points)
    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.

  • by Gunter134,

    Gunter134 Gunter134 Dec 2, 2014 3:59 PM in response to Baumkartoffel
    Level 1 (0 points)
    Dec 2, 2014 3:59 PM in response to Baumkartoffel

    Download iStats

     

    https://github.com/Chris911/iStats

     

    Install using instructions on the page, and to view CPU temps + fan rams in terminal type:

     

    istats fan

    or

    istats cpu

    or

    istats all

     

    honestly this is the best way to view because it shows a small graph with it too within terminal hope it helped!

Previous Page 2 of 3 last Next