Socket
Socket
Sign inDemoInstall

libsmc

Package Overview
Dependencies
100
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    libsmc

libsmc retrieves info from the Apple System Management Controller API


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

libsmc

Build Status NPM version

libsmc is a node.js binding to libsmc. It retrieves info from the Apple System Management Controller API. The SMC manages temperature and power within the machine.

API

smc.isBatteryPowered()

Checks whether or not the machine is running on battery power. Returns a bool value.

var smc = require('libsmc');

var usingBattery = smc.isBatteryPowered();
// => false

smc.isOpticalDiskDriveFull()

Checks whether or not the optical disk drive (ODD) of the machine has a disk in it. Returns a bool value.

var smc = require('libsmc');

var hasDisk = smc.isOpticalDiskDriveFull();
// => true

smc.getNumberOfFans()

Gets the number of fans a machine has. Returns an int value.

var smc = require('libsmc');

var number = smc.getNumberOfFans();
// => 2

smc.getFan(number)

Gets the information related to a specific fan. number is a positive integer unique to that fan, starting at 0. Returns an object of format { name, speed }, where name is the given name from the machine, and speed is the RPM (rotations per minute) of the fan at that point in time.

var smc = require('libsmc');

var fan = smc.getFan(0);
// => { name: 'ExhaustZ', speed: 2176 }

License

MIT license. beltex's libsmc is licensed separately.

Keywords

FAQs

Last updated on 13 Jun 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc