Coder Social home page Coder Social logo

istats's Introduction

iStats Gem Version

iStats is a command-line tool that allows you to easily grab the CPU temperature, fan speeds and battery information on OS X. If you'd like to see more data available feel free to open an issue.

Installation

$ gem install iStats
Note

If you are running an older version of OS X and the install fails you might want to try running this command instead:
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install iStats

Screenshot

All Stats

Sparkline levels

Usage

  - iStats: help ---------------------------------------------------

  istats --help                        This help text
  istats --version                     Print current version

  # Commands
  istats all                           Print all stats
  istats cpu                           Print all CPU stats
  istats cpu [temp | temperature]      Print CPU temperature
  istats fan                           Print all fan stats
  istats fan [speed]                   Print fan speed
  istats battery                       Print all battery stats
  istats battery [health]              Print battery health
  istats battery [time | remain]       Print battery time remaining
  istats battery [cycle_count | cc]    Print battery cycle count info
  istats battery [temp | temperature]  Print battery temperature
  istats battery [charge]              Print battery charge
  istats battery [capacity]            Print battery capacity info

  istats scan                          Scans and print temperatures
  istats scan [key]                    Print single SMC temperature key
  istats scan [zabbix]                 JSON output for Zabbix discovery
  istats enable [key | all]            Enables key
  istats disable [key | all]           Disable key
  istats list                          List available keys

  # Arguments
  --no-graphs                          Don't display sparklines graphs
  --no-labels                          Don't display item names/labels
  --no-scale                           Display just the stat value
  --value-only                         No graph, label, or scale
  -f, --fahrenheit                     Display temperatures in fahrenheit

  for more help see: https://github.com/Chris911/iStats

Advanced usage

iStats now supports extra sensors for advanced users. Here's how to enable that functionality:

  1. Run istats scan to scan your computer for SMC sensors
  2. Enable extra sensors by running istats enable key or istats enable all
  3. Run istats or istats extra to see the extra sensors information.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Tested on

Click to expand


MacBook Pro 2016 macOS: 10.12.6 Ruby: 2.4.1
MacBook Pro 2011 OS X: 10.11.6 Ruby: 2.0.0
MacBook Pro 2012 OS X: 10.9.3 Ruby: 1.9.3, 2.0.0, 2.1.1
MacBook Pro 2014 OS X: 10.10.3, 10.10.4 Ruby: 2.1.3
Mac Pro 2013 OS X: 10.12.6 Ruby: 2.0.0

Zabbix Integration

iStats has a "scan zabbix" mode which will emit JSON suitable for use with Zabbix low-level discovery. See the accompanying template and agent config in the integrations directory.

istats's People

Contributors

adzierzanowski avatar artoria2e5 avatar chris911 avatar devshane avatar domenicbrosh avatar elemongw avatar icodesometime avatar matiasherranz avatar mongrelx avatar nugget avatar poporul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

istats's Issues

battery info seems quite slow on my Yosemite mid 2009 mbp with an HDD.

Every time when I run istats, all information but the battery stats appear quickly. But for each battery info, it takes ~0.5 seconds for each item to appear.

When I dig into the source, I got a lot of ioreg -l | grep some_keyword in battery.rb. When I run time ioreg -l >/dev/null in bash, I got:

real    0m0.552s
user    0m0.109s
sys 0m0.312s

This is quite close to the delays between each item. It seems that first caching the output as a variable to store internally and then use ruby builtins to match regexes may be a better idea, since ioreg is really, really slow…

install complains about doc encoding

Parsing documentation for iStats-1.1.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.1.0

It works other than that.

Host is down

I get an error trying to install iStats.

On High Sierra:

ERROR:  While executing gem ... (Errno::EHOSTDOWN)
    Host is down - send(2)

On Sierra:

ERROR:  Could not find a valid gem 'iStats' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: tlsv1 alert protocol version (https://rubygems.org/latest_specs.4.8.gz)

newbie question about download and installation

I wanted to download your program and use it on my 2011 macbook pro (running High Sierra 10.13.6), but it's not exactly clear to me what I'm supposed to do or in what order in order to get it working. I am VERY new to tinkering around with my mac, new to programming, and new to github, etc so please forgive the ignorance! ANY help or guidance you'd be willing to offer a newbie would be greatly appreciated!

If it helps with context, what I did try downloading the files and running the installation command in a terminal window, but I received the following message:

macbook-pro:Applications a$ sudo gem install iStats
Password:
Fetching: sparkr-0.4.1.gem (100%)
Successfully installed sparkr-0.4.1
Fetching: parseconfig-1.0.8.gem (100%)
Successfully installed parseconfig-1.0.8
Fetching: iStats-1.6.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing iStats:
ERROR: Failed to build gem native extension.

current directory: /Library/Ruby/Gems/2.3.0/gems/iStats-1.6.1/ext/osx_stats

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20181107-637-1i81ihm.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/iStats-1.6.1 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/iStats-1.6.1/gem_make.out

If you're not sure how to help get me going or don't have the time, at a minimum I would definitely appreciate it if you could let me know which leftover files/folders from the failed installation are specific to iStats so I can clean them out in the event I can't get the program up and running. Thank you!

Problem Installing

Problem Installing it.
I'm running 10.11.6 on a 15" '16 MBP.

`

sudo gem install iStats
Password:
Fetching: sparkr-0.4.1.gem (100%)
Successfully installed sparkr-0.4.1
Fetching: parseconfig-1.0.8.gem (100%)
Successfully installed parseconfig-1.0.8
Fetching: iStats-1.2.0.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

creating Makefile

make "DESTDIR="
make: *** No rule to make target /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15/ruby/config.h', needed bysmc.o'. Stop.

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/iStats-1.2.0 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/iStats-1.2.0/ext/osx_stats/gem_make.out
`

Fails to install in 10.14

BuildVersion: 18A391, ProductVersion: 10.14

Building native extensions. This could take a while...
ERROR:  Error installing iStats:
	ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib/ruby/gems/2.5.0/gems/iStats-1.6.1/ext/osx_stats
/usr/local/opt/ruby/bin/ruby -r ./siteconf20181015-34693-1vpa299.rb extconf.rb
creating Makefile

current directory: /usr/local/lib/ruby/gems/2.5.0/gems/iStats-1.6.1/ext/osx_stats
make "DESTDIR=" clean

current directory: /usr/local/lib/ruby/gems/2.5.0/gems/iStats-1.6.1/ext/osx_stats
make "DESTDIR="
compiling smc.c
In file included from smc.c:23:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
/usr/local/include/Block.h:16:3: error: Never include this file directly. Use <lzma.h> instead.
#       error Never include this file directly. Use <lzma.h> instead.
        ^
/usr/local/include/Block.h:93:2: error: unknown type name 'lzma_check'
        lzma_check check;
        ^
/usr/local/include/Block.h:148:2: error: unknown type name 'lzma_vli'
        lzma_vli compressed_size;
        ^
/usr/local/include/Block.h:172:2: error: unknown type name 'lzma_vli'
        lzma_vli uncompressed_size;
        ^
/usr/local/include/Block.h:200:2: error: unknown type name 'lzma_filter'
        lzma_filter *filters;
        ^
/usr/local/include/Block.h:217:20: error: use of undeclared identifier 'LZMA_CHECK_SIZE_MAX'
        uint8_t raw_check[LZMA_CHECK_SIZE_MAX];
                          ^
/usr/local/include/Block.h:231:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int3;
        ^
/usr/local/include/Block.h:232:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int4;
        ^
/usr/local/include/Block.h:233:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int5;
        ^
/usr/local/include/Block.h:234:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int6;
        ^
/usr/local/include/Block.h:235:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int7;
        ^
/usr/local/include/Block.h:236:2: error: unknown type name 'lzma_vli'
        lzma_vli reserved_int8;
        ^
/usr/local/include/Block.h:237:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum1;
        ^
/usr/local/include/Block.h:238:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum2;
        ^
/usr/local/include/Block.h:239:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum3;
        ^
/usr/local/include/Block.h:240:2: error: unknown type name 'lzma_reserved_enum'
        lzma_reserved_enum reserved_enum4;
        ^
/usr/local/include/Block.h:261:2: error: unknown type name 'lzma_bool'
        lzma_bool ignore_check;
        ^
/usr/local/include/Block.h:263:2: error: unknown type name 'lzma_bool'
        lzma_bool reserved_bool2;
        ^
/usr/local/include/Block.h:264:2: error: unknown type name 'lzma_bool'
        lzma_bool reserved_bool3;
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [smc.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/lib/ruby/gems/2.5.0/gems/iStats-1.6.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-18/2.5.0/iStats-1.6.1/gem_make.out

lzma was install through the xz formula via brew. This error is produced with and without ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future

Feature request:Fan control

I know that there are already programs for that , but if we add ability to control fan speed to istat + daemon mode it will make this tool much more usefull.

Misreporting CPU temp

I've installed iStats on a mid-2007 iMac that runs OS 10.9.4 and does not use Homebrew. There are two odd bits:

  1. the reported CPU temperature is -127.0 C -- great for condensed matter physics experiments! :p
  2. fan 0 always reports 0 RPM (I note that this may be a hardware issue.)

The installation went like so:
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
$ rvm use system
$ sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install iStats

Documentation installation errors

Had some errors installing, I think with documentation only.

Yosemite 10.10.3

System Ruby:

$ ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]

Up-to-date RubyGems:

$ gem -v
2.4.7

Installation output:

$ sudo gem install iStats
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...
Successfully installed iStats-0.0.9
Parsing documentation for sparkr-0.4.1
Installing ri documentation for sparkr-0.4.1
Parsing documentation for iStats-0.0.9
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/iStats-0.0.9/osx_stats.bundle, skipping
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

cycleCount or cycle_count

Originating in 879bda3, the help and readme suggests istats battery cycleCount while command.rb requires istats battery cycle_count, so naturally the former fails while the latter works. Raising an issue rather than PR to decide which to prefer, as this the only two-word option.

Feature request: GPU temp

Will be good to have some info about GPU temp, its actual to those who has dual graphics macbook.
thanks

naming convention (suggestion)

Not an issue.

iStats is not a conventional name in ruby and not a common name for gems
I kept looking for 'istats' (all lower case).
Don't know if this matters to you, but I'd suggest making the name more discoverable.
Up to you, the beauty of ruby is that it doesn't enforce style.

In any case, beautiful gem. I was looking for something just like this. :)

istats scan -f shows all meters as critical

Thanks for all of your work on this program. It's great.

if run istats scan -f the meters seem to use the Fahrenheit temperature for the meter, which makes them all appear critical, when they're actually fine.

Same is true if I enable a key, the extra meter changes colors depending on whether I use the -f flag (though the default meters are fine)

$ istats -v
iStats v1.5.1

Slight issue with iStats and Watch

I thought i would use iStats with the watch command so i would get a real time tempature update every -n X seconds. Thou using the watch command i get the text read out, the ncurses graphics do now show up well or at all.

command used:
watch -n 10 iStats

visual output:
http://paste.opensuse.org/69335383

System information:
OS: OS X 10.11.6 • CPU: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz (2.40GHz) • Memory: 8.0 GiB Total (2.6 GiB Free) • Storage: 123.7 GB / 311.7 GB (188.0 GB Free) • VGA: NVIDIA GeForce 320 • Uptime: 5w 1d 20h 46m 2s

[iMac] CPU temp: -127.0ºC

First of all, really nice project! Congrats man.

I think it isn't identifying the correct CPU sensor for my iMac. Maybe TC0C?

screen shot 2016-01-27 at 12 39 41

Machine info:

screen shot 2016-01-27 at 12 40 49

not working on el capitan

Just downloaded and upgrade to 10.11.1 El Capitan and now i cant seem to iStats in terminal, is this a known issue?

Install fails on Snow Leopard

I'm trying to install iStats on Snow Leopard. This may not even be possible, but I'm checking with you anyway.

I'm getting the following errors:

Building native extensions.  This could take a while...
ERROR:  Error installing iStats:
    ERROR: Failed to build gem native extension.

and down the stack trace:

smc.c:397: error: ‘kIOPSTimeRemainingUnknown’ undeclared (first use in this function)
smc.c:397: error: (Each undeclared identifier is reported only once
smc.c:397: error: for each function it appears in.)
smc.c:399: error: ‘kIOPSTimeRemainingUnlimited’ undeclared (first use in this function)
make: *** [smc.o] Error 1

make failed, exit code 2

I'm using ruby 2.1.2 on OS X 10.6.8. Any idea what might be causing this?

Feature Request: Parameter to exclude colors in output

I would like to run and log the values of IStats watching the command every 5 mins.
The output contains color values that are only interpreted by the shell:

screen shot 2016-10-10 at 10 33 43 am

Would it be possible to exclude those color chars from the output?

Sorry if this is not the way request a feature.
Thanks!

no temps reported

just installed on a 2010 mac pro via gem . istats totally gets the fan speeds , which is dope , but reports 0.0C for (the only) cpu temp ... which seems wrong . but i'm gonna write a munin plugin to graph cpu and fan stuff right now anyways and hope that a fix can be found . i assume this is something w/ ioreg , but i haz no time right now to understand it .

--timball

ps) please ignore the terrible cut&paste job . my fonts terminal fonts are a bit wonked out .

VideoMac-2:~ timball$ istats fan
Total fans in system: 6
Fan 0 speed: 803.25 RPM  ÔûüÔûéÔûâÔûàÔûåÔûç
Fan 1 speed: 599.5 RPM  ÔûüÔûéÔûâÔûàÔûåÔûç
Fan 2 speed: 599.0 RPM  ÔûüÔûéÔûâÔûàÔûåÔûç
Fan 3 speed: 598.25 RPM  ÔûüÔûéÔûâÔûàÔûåÔûç
Fan 4 speed: 1112.75 RPM  ÔûüÔûéÔûâÔûàÔûåÔûç
Fan 5 speed: 1113.25 RPM  ÔûüÔûéÔûâÔûàÔûåÔûç
VideoMac-2:~ timball$ istats all
--- CPU Stats ---
CPU temp: 0.0┬░C  ÔûüÔûéÔûâÔûàÔûåÔûç

--- Fan Stats ---
Total fans in system: 6
Fan 0 speed: 802.25 RPM  ÔûüÔûéÔûâÔûàÔûåÔûç
Fan 1 speed: 599.25 RPM  ÔûüÔûéÔûâÔûàÔûåÔûç
Fan 2 speed: 598.0 RPM  ÔûüÔûéÔûâÔûàÔûåÔûç
Fan 3 speed: 598.25 RPM  ÔûüÔûéÔûâÔûàÔûåÔûç
Fan 4 speed: 1113.25 RPM  ÔûüÔûéÔûâÔûàÔûåÔûç
Fan 5 speed: 1113.25 RPM  ÔûüÔûéÔûâÔûàÔûåÔûç

--- Battery Stats ---
No battery on system
VideoMac-2:~ timball$ istats cpu temp
CPU temp: 0.0┬░C  ÔûüÔûéÔûâÔûàÔûåÔûç
VideoMac-2:~ timball$ istats cpu temperature
CPU temp: 0.0┬░C  ÔûüÔûéÔûâÔûàÔûåÔûç

Yosemite Ver10.10.2

Hi
I am not really good ay command line, i did follow the step, but it did not work for me!!

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

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
istats all
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/ruby.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

#include guard in smc.h doesn't prevent including twice

smc.h currently has an include guard at the top in this format

#ifndef __SMC_H__
#define __SMC_H__
#endif
<code>

This does nothing.. If it's included again, it will still include all the code, just not redefine __SMC_H__

It should be like this:

#ifndef __SHC_H__
#define __SMC_H__
<code>
#endif

This will ensure the header is only included once.

Crashes on Ruby 2.1.1

Ruby 2.1.1p76
On OSX 10.9.2, MBA 13-inch, Mid 2011

/usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/iStats-0.0.1/lib/osx_stats/osx_stats.bundle: [BUG] Segmentation fault at 0x00000000000418
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:
     * ~/Library/Logs/CrashReporter
     * /Library/Logs/CrashReporter
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   for more details.

-- Control frame information -----------------------------------------------
c:0012 p:-17529368641430 s:0053 e:000052 TOP    [FINISH]
c:0011 p:---- s:0051 e:000050 CFUNC  :require
c:0010 p:0115 s:0047 e:000046 METHOD /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55
c:0009 p:0007 s:0037 e:000036 TOP    /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/iStats-0.0.1/lib/istats.rb:2 [FINISH]
c:0008 p:---- s:0035 e:000034 CFUNC  :require
c:0007 p:0115 s:0031 e:000030 METHOD /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55
c:0006 p:0038 s:0021 e:000020 TOP    /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/iStats-0.0.1/bin/istats:6 [FINISH]
c:0005 p:---- s:0019 e:000018 CFUNC  :load
c:0004 p:0135 s:0015 E:000648 EVAL   /usr/local/var/rbenv/versions/2.1.1/bin/istats:23 [FINISH]
c:0003 p:---- s:0011 e:000010 CFUNC  :eval
c:0002 p:0118 s:0005 E:002050 EVAL   /usr/local/var/rbenv/versions/2.1.1/bin/ruby_executable_hooks:15 [FINISH]
c:0001 p:0000 s:0002 E:001a58 TOP    [FINISH]

/usr/local/var/rbenv/versions/2.1.1/bin/ruby_executable_hooks:15:in `<main>'
/usr/local/var/rbenv/versions/2.1.1/bin/ruby_executable_hooks:15:in `eval'
/usr/local/var/rbenv/versions/2.1.1/bin/istats:23:in `<main>'
/usr/local/var/rbenv/versions/2.1.1/bin/istats:23:in `load'
/usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/iStats-0.0.1/bin/istats:6:in `<top (required)>'
/usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/iStats-0.0.1/lib/istats.rb:2:in `<top (required)>'
/usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'

-- C level backtrace information -------------------------------------------
0   ruby                                0x0000000108024346 rb_vm_bugreport + 134
1   ruby                                0x0000000107eda953 report_bug + 307
2   ruby                                0x0000000107eda814 rb_bug + 180
3   ruby                                0x0000000107fa74e9 sigsegv + 153
4   libsystem_platform.dylib            0x00007fff8ead05aa _sigtramp + 26
5   libruby.2.0.0.dylib                 0x000000010858b3e0 ruby_xmalloc + 17
6   ???                                 0x00007fff57d60f00 0x0 + 140734667034368

-- Other runtime information -----------------------------------------------

* Loaded script: /usr/local/var/rbenv/versions/2.1.1/bin/istats

* Loaded features:

    0 enumerator.so
    1 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/enc/encdb.bundle
    2 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/enc/trans/transdb.bundle
    3 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/rbconfig.rb
    4 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/compatibility.rb
    5 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/defaults.rb
    6 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/deprecate.rb
    7 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/errors.rb
    8 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/version.rb
    9 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/requirement.rb
   10 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/platform.rb
   11 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/basic_specification.rb
   12 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/stub_specification.rb
   13 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/util/stringio.rb
   14 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/specification.rb
   15 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/exceptions.rb
   16 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb
   17 thread.rb
   18 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/thread.bundle
   19 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/monitor.rb
   20 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb
   21 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems.rb
   22 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/path_support.rb
   23 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/dependency.rb
   24 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb
   25 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/etc.bundle
   26 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/fileutils.rb
   27 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/pathname.bundle
   28 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/pathname.rb
   29 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/gem_path_manipulation.rb
   30 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/gem_helpers.rb
   31 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/match_platform.rb
   32 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/rubygems_ext.rb
   33 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/io/console.bundle
   34 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/user_interaction.rb
   35 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/config_file.rb
   36 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/rubygems_integration.rb
   37 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/version.rb
   38 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/constants.rb
   39 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/current_ruby.rb
   40 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler.rb
   41 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-unload-1.0.2/lib/bundler-unload.rb
   42 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/digest.bundle
   43 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/digest.rb
   44 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/digest/sha1.bundle
   45 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/environment.rb
   46 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/shared_helpers.rb
   47 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/runtime.rb
   48 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/settings.rb
   49 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/set.rb
   50 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/definition.rb
   51 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/dependency.rb
   52 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/ruby_dsl.rb
   53 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/dsl.rb
   54 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/source.rb
   55 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/uri/common.rb
   56 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/uri/generic.rb
   57 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/uri/ftp.rb
   58 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/uri/http.rb
   59 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/uri/https.rb
   60 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/uri/ldap.rb
   61 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/uri/ldaps.rb
   62 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/uri/mailto.rb
   63 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/uri.rb
   64 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/socket.bundle
   65 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/socket.rb
   66 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/timeout.rb
   67 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/net/protocol.rb
   68 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/zlib.bundle
   69 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/stringio.bundle
   70 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/net/http/exceptions.rb
   71 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/net/http/header.rb
   72 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/net/http/generic_request.rb
   73 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/net/http/request.rb
   74 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/net/http/requests.rb
   75 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/net/http/response.rb
   76 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/net/http/responses.rb
   77 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/net/http/proxy_delta.rb
   78 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/net/http/backward.rb
   79 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/net/http.rb
   80 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/date_core.bundle
   81 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/date/format.rb
   82 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/date.rb
   83 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/time.rb
   84 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/request.rb
   85 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/cgi/core.rb
   86 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/cgi/util.rb
   87 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/cgi/cookie.rb
   88 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/cgi.rb
   89 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/uri_formatter.rb
   90 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/fcntl.bundle
   91 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle
   92 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/openssl/bn.rb
   93 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/openssl/cipher.rb
   94 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/openssl/config.rb
   95 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/openssl/digest.rb
   96 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/openssl/x509.rb
   97 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/openssl/buffering.rb
   98 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/openssl/ssl.rb
   99 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/openssl.rb
  100 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/securerandom.rb
  101 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/resolv.rb
  102 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/remote_fetcher.rb
  103 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/text.rb
  104 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/name_tuple.rb
  105 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/spec_fetcher.rb
  106 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/source/rubygems.rb
  107 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/source/path.rb
  108 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/source/git.rb
  109 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/strscan.bundle
  110 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/lockfile_parser.rb
  111 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/lazy_specification.rb
  112 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb
  113 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/2.1.0/forwardable.rb
  114 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/spec_set.rb
  115 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/index.rb
  116 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/remote_specification.rb
  117 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/endpoint_specification.rb
  118 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/bundler-1.6.1/lib/bundler/source/git/git_proxy.rb
  119 /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rubygems-bundler-1.4.3/lib/rubygems-bundler/noexec.rb

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Not working on El Capitan public beta

I had iStats installed in Yosemite, but when trying to run it in El Capitan I get command not found.

I tried installing it again and this is the output I get

sudo gem install iStats
Password: 
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
creating Makefile

make "DESTDIR="
make: *** No rule to make target             `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.    10.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-    darwin15/ruby/config.h', needed by `smc.o'.  Stop.


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/iStats-1.0.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/iStats-1.0.1/ext/osx_stats/gem_make.out

No such file or directory - ioreg

iStats was working fine and all of the sudden I started getting this error. Any suggestions?

--- CPU Stats ---
CPU temp: 51.13°C ▁▂▃▅▆▇

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

--- Battery Stats ---
Battery health: Good
/Library/Ruby/Gems/2.0.0/gems/iStats-1.4.0/lib/iStats/battery.rb:49:in ``': No such file or directory - ioreg (Errno::ENOENT)
from /Library/Ruby/Gems/2.0.0/gems/iStats-1.4.0/lib/iStats/battery.rb:49:in cycle_count' from /Library/Ruby/Gems/2.0.0/gems/iStats-1.4.0/lib/iStats/battery.rb:41:in all'
from /Library/Ruby/Gems/2.0.0/gems/iStats-1.4.0/lib/iStats/command.rb:70:in `all'
from /Library/Ruby/Gems/2.0.0/gems/iStats-1.4.0/lib/iStats/command.rb:40:in `delegate'
from /Library/Ruby/Gems/2.0.0/gems/iStats-1.4.0/lib/iStats/command.rb:20:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/iStats-1.4.0/bin/istats:8:in `<top (required)>'
from /usr/local/bin/istats:23:in `load'
from /usr/local/bin/istats:23:in `

'

Check if there's a battery on system

Check if there's a battery on system (macbook). If not, print "No Battery" in the battery stats section instead of showing "unknown" messages.

broken after gem pristine iStats --version 1.6.1

was working fine - noticed line on executing
Ignoring iStats-1.6.1 because its extensions are not built. Try: gem pristine iStats --version 1.6.1

so I tried to run "gem pristine iStats --version 1.6.1" and now it's broken.

$ gem pristine iStats --version 1.6.1
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
peter$ sudo gem pristine iStats --version 1.6.1
Password:
Restoring gems to pristine condition...
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Ext::BuildError)
ERROR: Failed to build gem native extension.

current directory: /Library/Ruby/Gems/2.3.0/gems/iStats-1.6.1/ext/osx_stats

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20181029-60065-18ohgui.rb extconf.rb
creating Makefile

current directory: /Library/Ruby/Gems/2.3.0/gems/iStats-1.6.1/ext/osx_stats
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.3.0/gems/iStats-1.6.1/ext/osx_stats
make "DESTDIR="
make: *** No rule to make target /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h', needed by smc.o'. Stop.

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/iStats-1.6.1 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/iStats-1.6.1/gem_make.out

Battery Temperature reading from ioreg [Idea/Discussion]

Hi,

This is not really an issue with iStats it is just something i noticed and i thought that you are the guy to discuss this with.

I was curious about the battery temperature on my mac, and came across iStats (thanks for your work on it!). Reading the source code i noticed it uses ioreg -rn AppleSmartBattery for some measurements (i.e. capacities and cycles).

ioreg -rn AppleSmartBattery also returns a Temperature reading. Somewhere else i saw that the value is read as it was in Celsius * 100.

But that seems not quite in agreement with the iStats battery temperature, that as far as i can tell is read using SMC and the TB0T key.

So, i collected around 10 days of minute by minute simultaneous readings from both sources, the ioreg -rn AppleSmartBattery``Temperature and istats battery temperature, then i ran a linear regression using those values. And given the resulting coefficient and intercept, i have the theory that the ioreg -rn AppleSmartBattery Temperature reading is in tenths of Kelvin. Do you think that is possible?

What bothers me is that while the conversion is very good (.975 Rˆ2 with the tenths of kelvin to celsius conversion) it is not perfect, there are some different ioreg readings with the same istats value. That could be maybe that the sensor changed value before the second measurement was taken, they are technically not simultaneous. Or that they are coming from different sensors. If they come from different sensors, which is the one to trust?

Well, i hope you find this interesting and share your expert insights.

Thank you!

Sparklines don't respect temperature units

First, thanks for this awesome utility!

When I do not use the -f flag, my CPU temperature is normal (say, 44 degrees Celsius). However, when I enable -f, the CPU temperature jumps appropriately (say, to 110 degrees Fahrenheit), and the sparkline flashes red (I'm assuming because the new value is above the threshold designed for Celsius temperatures).

More battery stats

Stats to add:

  • Current Max mAH
  • Original Max mAH
  • Health (current / original)
  • Current mAH usage

istats doesn't work on macOS High Sierra

sudo gem install iStats

Building native extensions.  This could take a while...
ERROR:  Error installing iStats:
	ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.3.0/gems/iStats-1.5.0/ext/osx_stats
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20170926-3455-ls7i4z.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/iStats-1.5.0 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/iStats-1.5.0/gem_make.out

Tsqf sensor Unknown

MacBook Pro (15-inch, Mid 2012)
El Capitan 10.11.6 (15G1421)

After changing standard hard drive to SSD I'm seeing heating problems (kernel takes over and system performance slows [expected behaviour] - fans shift to high rotation as they should). I've used iStats to see various temperatures. The one sensor value returned by iStats that seems to correlate with slowdowns is: Tsqf Unknown
Moves from normal temp (about 43C) up to 74C when the kernel kicks in to take over.
**I've searched lots but cannot find any references to the Tsqf key. Any ideas what this is? **
Thanks.

--value-only and rounded values

Hey Chris,
I'm working on some cool stuff (will share it soon, spoiler: you can check my empty repo 😜)
Is there a flag to get rounded values or I have to use awk or bc? Thanks!

Feature request

would be nice to have a way to loop the code, without using watch or other methods

Problem installing on 10.9.4

Hi there,
Was very excited to try this out but i encountered an error installing it on my week-old macbook pro, i7 running 10.9.4. I've never used ruby before so I appologize if I'm missing something but I ran sudo gem install iStats and this was the error:

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/ruby.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

Here's the contents of said log file:

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

(not sure if this is the correct place to post this :S appologies if this is not the case)

Specific commands do not work

Commands from this type do not work:
istats battery [charge] Print battery charge
istats battery [capacity] Print battery capacity info

Keep getting error "no matches found: [charge]"

any advice?
Thanks

Cheers

unable to convert "\xCA" ...

System info:

macOS Sierra
version 10.12.4

Install completed, but with the following errors (see image attatched):

 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 

screen shot 2017-05-01 at 3 23 32 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.