Query IPMI
Query IPMI interfaces with cnquery
Rely on cnquery to query and inventory your servers using the Intelligent Platform Management Interface (IPMI). IPMI provides management and monitoring capabilities independently of the host system's CPU, firmware (BIOS or UEFI), and operating system.
Requirements
To analyze and explore your IPMI interfaces with cnquery, you must have:
- cnquery installed on your workstation.
- Network access to the IPMI interface (typically on a dedicated management port).
- IPMI credentials (username and password).
Connect to an IPMI interface
To query an IPMI interface, provide the username and host address:
cnquery shell ipmi USER@HOST| For... | Substitute... |
|---|---|
| USER | Your IPMI username |
| HOST | The IPMI interface IP or hostname |
For example:
cnquery shell ipmi admin@192.168.1.100 --ask-pass
Enter password:You can also provide the password directly:
cnquery shell ipmi admin@192.168.1.100 --password YOUR_PASSWORDExample queries
Once connected, you can query IPMI resources.
This query retrieves the device ID information:
cnquery> ipmi.deviceID
ipmi.deviceID: {
deviceAvailable: true
deviceRevision: 1
firmwareRevision: "2.45"
...
}This query retrieves the chassis status:
cnquery> ipmi.chassis
ipmi.chassis: {
systemPower: "on"
...
}This query retrieves the management controller GUID:
cnquery> ipmi.guid
ipmi.guid: "12345678-1234-1234-1234-123456789abc"Exit the cnquery shell
To exit the cnquery shell, either press Ctrl + D or type exit.
Learn more
-
To learn more about how the MQL query language works, read Write Effective MQL.
-
For a list of all the IPMI resources and fields you can query, read the IPMI Resource Pack Reference.