Skip to content
MetricsHubPublic

About

IPMI Java Client

Topics

Resources

Stars

9 stars

Watchers

3 watching

Forks

Repository files navigation

IPMI Java Client

GitHub release (with filter) Build GitHub top language License

This project is a fork of the excellent IPMI Library for Java by Verax Systems (see also). It is however not related to another fork by rbuckland.

See Project Documentation and the Javadoc for more information on how to use this library in your code.

The IPMI Java Client talks to the Baseboard Management Controller (BMC) of a server over IPMI 2.0 over LAN (RMCP+): it reads the chassis status, the Field Replaceable Units (FRUs) and the sensors of the SDR repository, as Java objects or as the text output that MetricsHub parses, and its low-level API sends any IPMI command (System Event Log, chassis control, Serial over LAN). It requires Java 8 or later.

IpmiClientConfiguration config = new IpmiClientConfiguration("bmc.example.com", "monitor", password, null, false, 120);
System.out.println(IpmiClient.getChassisStatusAsStringResult(config));
System.out.println(IpmiClient.getFrusAndSensorsAsStringResult(config));

The BMC must have IPMI over LAN enabled and an account with the User privilege: see Preparing the BMC.

Upgrading

Version 1.2.03 makes the protected fields of the protocol classes (AbstractIpmiRunner, MessageHandler, IpmiLanMessage, ConfidentialityAlgorithm, IntegrityAlgorithm) private. Subclasses must use the new protected accessors instead; see Upgrading from 1.2.02 for the list. The IpmiClient API is unchanged. The Full, Compact and Event-Only sensor records now share the AbstractSensorRecord superclass, and commands can check responses with IpmiCommandCoder.validateResponse(); both are described on the same page.

Build instructions

This is a simple Maven project. Build with:

mvn verify

mvn verify site also builds the documentation in target/site (sources in src/site).

Code format

The code is formatted with the MetricsHub Eclipse formatter profile (metricshub-eclipse-formatter.xml, shared with the other MetricsHub Java projects), and the build fails on unformatted code. Simply run the below command before committing:

mvn formatter:format

The build also fails on Checkstyle violations. A justified violation can be suppressed with // CHECKSTYLE.OFF: <RuleName> and // CHECKSTYLE.ON: <RuleName> comments.

To ignore the whole-tree reformat commit in git blame, run once:

git config blame.ignoreRevsFile .git-blame-ignore-revs

Release instructions

The artifact is deployed to Sonatype's Maven Central.

The actual repository URL is https://s01.oss.sonatype.org/, with server Id ossrh and requires credentials to deploy artifacts manually.

But it is strongly recommended to only use GitHub Actions "Release to Maven Central" to perform a release:

  • Manually trigger the "Release" workflow
  • Specify the version being released and the next version number (SNAPSHOT)
  • Release the corresponding staging repository on Sonatype's Nexus server
  • Merge the PR that has been created to prepare the next version

License

License is GNU General Lesser Public License (LGPL) version 3.0. The IPMI Library for Java by Verax Systems is published under the GNU GPL v3; this fork uses it under a commercial (non-GPL) license granted by Verax Systems to Sentry Software in 2021. The source files derived from it keep Verax Systems as copyright holder.

Each source file includes the LGPL-3 header (build will fail otherwise). To add the header to new source files, simply execute the below command (existing headers are never modified):

mvn license:update-file-header

About

IPMI Java Client

Topics

Resources

Stars

9 stars

Watchers

3 watching

Forks

Releases

Used by

Contributors

Languages