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 = ; var server1 = host: '' // IP Address/Hostname port: 80 username: 'ADMIN' password: 'ADMIN';
Methods
getHostAddress()
Basic method to construct the URL for HTTP request
Example
console; // 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;
getCurrentPowerState(callback)
Get the current power state of the host.
Arguments
callback(err, powerState)
- Callback function for error/response handling
Example
server1;
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 optionscallback(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;
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.