質問

OS XでCPU温度とファン速度を取得するにはどうすればよいですか?

情報はから得られていることを理解しています IOHWSensorIOKit, 、しかし、それを正確に行う方法に関する信頼できる情報を見つけることができません。

サンプルプログラムを含む記事を見つけました - http://www.booktou.com/node/148/0321278542/ch10lev1sec7.html, 、しかし、私がそれで得るのはGPU温度だけです。 Unibody MacにCPU温度センサーがあると確信しているので、何か間違ったことをしていることを意味します。

役に立ちましたか?

解決

The source code for this Prefpane that's called FanControl is avilable; it shows temperatures and fan speeds: http://www.lobotomo.com/products/FanControl/index.html

他のヒント

If you have npm installed, there is also cli tool called macstats. You can install it using:

[sudo] npm install macstats -g

Then just run the command and it will give you output like:

--- CPU Stats ---
CPU Temp:        33.75°C

--- Fans Stats ---
Fan 0 speed:     1996 RPM
Fan 1 speed:     2003 RPM

--- Battery Stats ---
Charged:         82%
Capacity:        92%
Cycle Count:     692 (69%)
Max Cycle Count: 1000
Current Charge:  5189 mAh
Maximum Charge:  6316 mAh
Design Capacity: 6900 mAh
Time Remaining:  6.54 h
Temperature:     30.06°C

The tools also exposes API that you can use in a custom application.
See https://github.com/jkuri/macstats for more information.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top