{"name":"smc","version":"2.0.0","description":"Node module to read the CPU temperature and fan speed on osx using smc","main":"index.js","author":{"name":"Massimiliano Marcon"},"license":"GPL","gypfile":true,"os":["darwin"],"engines":{"node":">=0.12"},"repository":{"type":"git","url":"git+https://github.com/mmarcon/node-smc.git"},"keywords":["cpu","temperature","smc","osx","darwin","mac","addon"],"scripts":{"install":"node-gyp rebuild"},"gitHead":"24dc8174825914a86cb77a3af04d14afe9acce18","bugs":{"url":"https://github.com/mmarcon/node-smc/issues"},"homepage":"https://github.com/mmarcon/node-smc#readme","_id":"smc@2.0.0","_shasum":"2cc6a3e3db3bda9525b34b4328112de07ecc34dd","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.7.0","_npmUser":{"name":"mmarcon","email":"me@marcon.me"},"dist":{"shasum":"2cc6a3e3db3bda9525b34b4328112de07ecc34dd","tarball":"http://registry-npm.ywwl.com/smc/download/smc-2.0.0.tgz","integrity":"sha512-eRiSIzOZh5wmd5TdlLHmbHtCtpJofQJMDsQKRPu7k6xVRNc8eNdaj6n7WfI5f34dJkcmWuQRHkOaspgOE7QBVA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7aaZhbNr5iPUZds6XD7KAsiTG2nKagzYWRFA68rK7KwIhAIQpAzmJfRP96SWhZkE5lMj+ZG4CJq/SpIJivngv2pJs"}],"size":4687,"noattachment":false,"key":"/smc/-/smc-2.0.0.tgz"},"maintainers":[{"name":"mmarcon","email":"me@marcon.me"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/smc-2.0.0.tgz_1483963775966_0.6580839050002396"},"directories":{},"readme":"# Node SMC\n\nThis node module uses [Apple's SMC subsystem](http://en.wikipedia.org/wiki/System_Management_Controller) to query the system for the CPU temperature, number of fans and for each of the fans retrieves the current RPM.\n\n**This packages works on OSX only**.\n\n## Installation\n\n```sh\nnpm install smc\n```\n\n## Example\n\n```javascript\nvar smc = require('smc');\n\nObject.keys(smc.metrics).forEach(function(key) {\n  var value = smc.get(key);\n  if (value > 0) {\n    console.log(key, smc.metrics[key]+':', value);\n  }\n});\n\nvar i, f = smc.fans();\n\nfor (i = 0; i < f; i++) {\n  console.log('F'+i+'Ac', 'Fan', i, 'RPM:', smc.fanRpm(i));\n}\n```\n\nOn my Macbook Pro this prints out the following:\n\n```\nTB0T Battery TS_MAX: 34.59765625\nTB1T Battery 1: 34.59765625\nTB2T Battery 2: 32.59765625\nTCXC PECI CPU: 78.875\nTC0E CPU 0 ??: 80.56640625\nTC0F CPU 0 ??: 82.16015625\nTC0P CPU 0 Proximity: 65.875\nTC1C Core 1: 77\nTC2C Core 2: 78\nTC3C Core 3: 77\nTC4C Core 4: 75\nTCGC PECI GPU: 78\nTCSA PECI SA: 78\nTh1H NB/CPU/GPU HeatPipe 1 Proximity: 51.625\nTM0P Memory Slot Proximity: 53.125\nTM0S Memory Slot 1: 53.1171875\nTPCD Platform Controller Hub Die: 57\nTs0P Palm rest L: 32.5\nTs0S Memory Bank Proximity: 40.23046875\nTW0P AirPort Proximity: 48.5\nF0Ac Fan 0 RPM: 2160\nF1Ac Fan 1 RPM: 2001\n```\n\n## Credits\n\nMost of the work was done by [Sébastien Lavoie](https://github.com/lavoiesl) in his [osx-cpu-temp](https://github.com/lavoiesl/osx-cpu-temp) code. I just took it and made it into a node module, as it was convenient for me to use it that way.\n\nAdditional credit goes to [Hendrik Holtmann](https://github.com/hholtmann), the author of [smcFanControl](https://github.com/hholtmann/smcFanControl) as his code inspired osx-cpu-temp and as I used part of the code of smcFanControl to query the fan speed and format the result.\n\n## License\n\n[GNU General Public License, version 2](http://www.gnu.org/licenses/gpl-2.0.html)\n\n## TODO\n\nMake it asynchronous, as currently everything happens synchronously.\n","publish_time":1483963778216,"_cnpm_publish_time":1483963778216,"dist-tags":{"latest":"2.0.0"}}