Node module to read the CPU temperature and fan speed on osx using smc
This node module uses Apple's SMC subsystem to query the system for the CPU temperature, number of fans and for each of the fans retrieves the current RPM.
This packages works on OSX only.
➜ ~ npm install smc
var smc = require'node-smc';console.log'Temperature:' smctemperature;var i f = smcfans;console.log'Fans:' f;for i = 0; i < f; i++console.log'Fan' i 'RPM:' smcfanRpmi;
On my Macbook Air this prints out the following:
Temperature: 35.625 Fans: 1 Fan 0 RPM: 1201
Make it asynchronous, as currently everything happens synchronously.