npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

supermicro-ipmi

v0.0.2

Published

Simple module for accessing and controlling the IPMI interface on Supermicro motherboards

Downloads

18

Readme

Supermicro IPMI

Simple module for accessing and controlling the IPMI interface on Supermicro motherboards.

Installation

npm install supermicro-ipmi

Usage

First create an instance

var ipmi = require('supermicro-ipmi');

var server1 = new ipmi({
  host: '', // IP Address/Hostname
  port: 80,
  username: 'ADMIN',
  password: 'ADMIN'
});

Methods

getHostAddress()

Basic method to construct the URL for HTTP request

Example

console.log(server1.getHostAddress());

// example output: http://192.168.0.10:80/

login(callback)

Method to prevent code duplication of the login process required when performing actions via HTTP.

Arguments

  • callback(err) - Action to perform once the login request has been made

Example

server1.login(function(err) {
  if (err) {
    callback(err);
    return;
  }

  console.log('We are successfully logged in');
});

getCurrentPowerState(callback)

Get the current power state of the host.

Arguments

  • callback(err, powerState) - Callback function for error/response handling

Example

server1.getCurrentPowerState(function(err, state) {
  if (err) {
    console.log(err);
    return;
  }

  if (state == 1) {
    console.log('The server is currently online');
  } else {
    console.log('The server is currently offline');
  }
});

setPowerAction(powerAction, callback)

Perform a power action on the server

Arguments

  • powerAction - Integer containing the power action to perform, see the table below for valid options
  • callback(err) - Callback function for error/success handling

All power actions are available within supermicro.powerAction object.

|State|powerAction| |-----|-----------| |3|RESET| |0|OFF_IMMEDIATE| |5|OFF_ORDERLY| |1|ON| |2|CYCLE|

Example

server1.setPowerAction(supermicro.powerAction.ON, function(err) {
  if (err) {
    console.log(err);
    return;
  }

  console.log('Successfully sent request to power server on');
});

Notes

No doubt there are better ways to achieve this but without spending a considerable amount of time looking for alternatives I have simply reverse engineered the web GUI and made it into a module.

Not 100% sure if this will work on all versions of the Supermicro IPMI implementation, only been tested on my X9SCM-F board.

Licence

The MIT License (MIT)