A Pure python IPMI library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Jarrod Johnson 077dbd645b
Stage alternate power meter support
1 week ago
doc Do not use openstackdocstheme 2 years ago
playbooks/legacy/tempest-devstack-ironic-pxe_ipmitool-pyghmi-src Replace openstack.org git:// URLs with https:// 4 years ago
pyghmi Stage alternate power meter support 1 week ago
zuul.d Add SMM2 VPD to configuration for SMM 10 months ago
.coveragerc Switch to stestr 5 years ago
.gitignore Add more file patterns for git to ignore 5 years ago
.gitreview OpenDev Migration Patch 4 years ago
.stestr.conf Switch to stestr 5 years ago
CONTRIBUTING.rst Update package documentation 5 years ago
LICENSE Place project under Apache license 2.0 10 years ago
MANIFEST.in Align to OpenStack Build Standards. 10 years ago
README Install scripts as well as library 9 years ago
README.md Fix minor .spec issues 5 years ago
builddeb Fix building under wheezy 3 years ago
buildrpm Enable package builds without pbr 4 years ago
makesetup Enable package builds without pbr 4 years ago
py27-constraints.txt Reconfigure tox 2 years ago
python-pyghmi.spec Add dateutil requirement for python2 users 3 years ago
python-pyghmi.spec.tmpl Add a spec template for rpm build 4 years ago
requirements.txt Reconfigure tox 2 years ago
setup.cfg Reconfigure tox 2 years ago
setup.py Refactor console scripts into entry points 5 years ago
setup.py.tmpl Add iDrac virtual cd/floppy 1 year ago
test-requirements.txt Add SMM2 VPD to configuration for SMM 10 months ago
tox.ini Improve tests 1 year ago
wheezy.patch Update the Wheezy patch 4 years ago



Pyghmi is a pure Python (mostly IPMI) server management library.

Building and installing

(These instructions have been tested on CentOS 7)

Clone the repository, generate the RPM and install it:

$ git clone https://github.com/openstack/pyghmi.git
$ cd pyghmi/
$ python setup.py bdist_rpm
$ sudo rpm -ivh dist/pyghmi-*.noarch.rpm


There are a few use examples in the bin folder:

  • fakebmc: simply fakes a BMC that supports a few IPMI commands (useful for testing)
  • pyghmicons: a remote console based on SOL redirection over IPMI
  • pyghmiutil: an IPMI client that supports a few direct uses of pyghmi (also useful for testing and prototyping new features)
  • virshbmc: a BMC emulation wrapper using libvirt


If you plan on adding support for new features, you'll most likely be interested in adding your methods to pyghmi/ipmi/command.py. See methods such as get_users and set_power for examples of how to use internal mechanisms to implement new features. And please, always document new methods.

Sometimes you may want to implement OEM-specific code. For example, retrieving firmware version information is not a part of standard IPMI, but some servers are known to support it via custom OEM commands. If this is the case, follow these steps:

  • Add your generic retrieval function (stub) to the OEMHandler class in pyghmi/ipmi/oem/generic.py. And please, document its intent, parameters and expected return values.
  • Implement the specific methods that your server supports in subdirectories in the oem folder (consider the lenovo submodule as an example). A OEM folder will contain at least one class inheriting from OEMHandler, and optionally helpers for running and parsing custom OEM commands.
  • Register mapping policies in pyghmi/ipmi/oem/lookup.py so pyghmi knows how to associate a BMC session with the specific OEM code you implemented.

A good way of testing the new feature is using bin/pyghmiutil. Just add an extension for the new feature you just implemented (as a new command) and call it from the command line:

$ IPMIPASSWORD=passw0rd bin/pyghmiutil [BMC IP address] username my_new_feature_command