Ipmitool: Difference between revisions

From Leo's Notes
This page was last edited on 15 September 2020, at 18:15.
m Added categories
view system logs
Line 2: Line 2:


The project can be found at:
The project can be found at:
* https://github.com/ipmitool/ipmitool


== Installation ==
*https://github.com/ipmitool/ipmitool
 
==Installation==
Clone the repository from https://github.com/ipmitool/ipmitool, then run {{code|autoconf}}, {{code|./configure}}, {{code|make}}.  
Clone the repository from https://github.com/ipmitool/ipmitool, then run {{code|autoconf}}, {{code|./configure}}, {{code|make}}.  


A docker image containing this binary can be found at:
A docker image containing this binary can be found at:
* https://git.steamr.com/docker/alpine-ipmitool


== Usage ==
*https://git.steamr.com/docker/alpine-ipmitool
=== Clearing System Event Log ===
 
==Usage==
 
=== View System Event Logs ===
Use <code>ipmitool sel elist</code> to show logs.
{{Highlight
| code = # ipmitool sel elist
  1 {{!}} 08/24/2006 {{!}} 14:05:17 {{!}} Event Logging Disabled SEL {{!}} Log area reset/cleared {{!}} Asserted                                       
  2 {{!}} 12/11/2008 {{!}} 03:21:50 {{!}} Memory ECC Corr Err {{!}} Correctable ECC (Correctable ECC {{!}} Bank 1DIMM B) {{!}} Asserted                   
  3 {{!}}  Pre-Init  {{!}}0000000011{{!}} Physical Security Intrusion {{!}} General Chassis intrusion {{!}} Asserted                                   
  4 {{!}}  Pre-Init  {{!}}0000000017{{!}} Physical Security Intrusion {{!}} General Chassis intrusion {{!}} Deasserted                                 
  5 {{!}}  Pre-Init  {{!}}0000000011{{!}} Physical Security Intrusion {{!}} General Chassis intrusion {{!}} Asserted                                   
  6 {{!}}  Pre-Init  {{!}}0000000016{{!}} Physical Security Intrusion {{!}} General Chassis intrusion {{!}} Deasserted                                 
  7 {{!}}  Pre-Init  {{!}}0000000011{{!}} Physical Security Intrusion {{!}} General Chassis intrusion {{!}} Asserted                                   
  8 {{!}}  Pre-Init  {{!}}0000000016{{!}} Physical Security Intrusion {{!}} General Chassis intrusion {{!}} Deasserted                                 
  9 {{!}} 06/11/2020 {{!}} 08:40:21 {{!}} Voltage CMOS Battery {{!}} Lower Critical going low  {{!}} Asserted {{!}} Reading 2.57 < Threshold 2.64 Volts   
  a {{!}} 06/11/2020 {{!}} 08:41:41 {{!}} Voltage CMOS Battery {{!}} Lower Critical going low  {{!}} Deasserted {{!}} Reading 2.73 < Threshold 2.64 Volts 
  b {{!}} 06/13/2020 {{!}} 19:01:06 {{!}} Voltage CMOS Battery {{!}} Lower Critical going low  {{!}} Asserted {{!}} Reading 2.63 < Threshold 2.64 Volts   
  c {{!}} 06/13/2020 {{!}} 19:01:11 {{!}} Voltage CMOS Battery {{!}} Lower Critical going low  {{!}} Deasserted {{!}} Reading 2.68 < Threshold 2.64 Volts
| lang = terminal
}}
 
===Clearing System Event Log===
Run {{code|ipmitool sel clear}} to clear all SEL logs.  This is useful if your machine has an amber light due to a machine check which you wish to clear.
Run {{code|ipmitool sel clear}} to clear all SEL logs.  This is useful if your machine has an amber light due to a machine check which you wish to clear.


=== Polling Data ===
===Polling Data===
Poll the data from iLO by running {{code|ipmitool}}. An example output is given below.
Poll the data from iLO by running {{code|ipmitool}}. An example output is given below.


Line 68: Line 90:
The data can be parsed then pushed into a logging server.
The data can be parsed then pushed into a logging server.


== Troubleshooting ==
==Troubleshooting==
{{highlight|lang=terminal|code=
{{highlight|lang=terminal|code=
$ autoconf
$ autoconf
Line 83: Line 105:
}}
}}


{{Navbox Linux}}[[Category:Linux]]
{{Navbox Linux}}
[[Category:Linux]]
[[Category:LinuxUtilities]]
[[Category:LinuxUtilities]]

Revision as of 18:15, 15 September 2020

ipmitool is a utility to fetch information from devices that support the Intelligent Platform Management Interface (IPMI). This includes servers such as the HP Proliant DL380 G6 which I have at home or practically all Dell servers.

The project can be found at:

Installation

Clone the repository from https://github.com/ipmitool/ipmitool, then run autoconf, ./configure, make.

A docker image containing this binary can be found at:

Usage

View System Event Logs

Use ipmitool sel elist to show logs.

# ipmitool sel elist
   1 | 08/24/2006 | 14:05:17 | Event Logging Disabled SEL | Log area reset/cleared | Asserted                                        
   2 | 12/11/2008 | 03:21:50 | Memory ECC Corr Err | Correctable ECC (Correctable ECC | Bank 1DIMM B) | Asserted                     
   3 |  Pre-Init  |0000000011| Physical Security Intrusion | General Chassis intrusion | Asserted                                    
   4 |  Pre-Init  |0000000017| Physical Security Intrusion | General Chassis intrusion | Deasserted                                  
   5 |  Pre-Init  |0000000011| Physical Security Intrusion | General Chassis intrusion | Asserted                                    
   6 |  Pre-Init  |0000000016| Physical Security Intrusion | General Chassis intrusion | Deasserted                                  
   7 |  Pre-Init  |0000000011| Physical Security Intrusion | General Chassis intrusion | Asserted                                    
   8 |  Pre-Init  |0000000016| Physical Security Intrusion | General Chassis intrusion | Deasserted                                  
   9 | 06/11/2020 | 08:40:21 | Voltage CMOS Battery | Lower Critical going low  | Asserted | Reading 2.57 < Threshold 2.64 Volts     
   a | 06/11/2020 | 08:41:41 | Voltage CMOS Battery | Lower Critical going low  | Deasserted | Reading 2.73 < Threshold 2.64 Volts   
   b | 06/13/2020 | 19:01:06 | Voltage CMOS Battery | Lower Critical going low  | Asserted | Reading 2.63 < Threshold 2.64 Volts     
   c | 06/13/2020 | 19:01:11 | Voltage CMOS Battery | Lower Critical going low  | Deasserted | Reading 2.68 < Threshold 2.64 Volts

Clearing System Event Log

Run ipmitool sel clear to clear all SEL logs. This is useful if your machine has an amber light due to a machine check which you wish to clear.

Polling Data

Poll the data from iLO by running ipmitool. An example output is given below.

/tmp # ./ipmitool -I lanplus -H X.X.X.X -U Administrator -P XXXXXXXXXX sensor
Unable to Get Channel Cipher Suites
UID Light        | 0x0        | discrete   | 0x0080| na        | na        | na        | na        | na        | na
Sys. Health LED  | 0x0        | discrete   | 0x0080| na        | na        | na        | na        | na        | na
Power Supply 1   | 85         | Watts      | ok    | na        | na        | na        | na        | na        | na
Power Supply 2   | 95         | Watts      | ok    | na        | na        | na        | na        | na        | na
Power Supplies   | 0x0        | discrete   | 0x0180| na        | na        | na        | na        | na        | na
Fan 1            | 13.720     | percent    | ok    | na        | na        | na        | na        | na        | na
Fan 2            | 13.720     | percent    | ok    | na        | na        | na        | na        | na        | na
Fan 3            | 22.736     | percent    | ok    | na        | na        | na        | na        | na        | na
Fan 4            | 27.048     | percent    | ok    | na        | na        | na        | na        | na        | na
Fan 5            | 22.736     | percent    | ok    | na        | na        | na        | na        | na        | na
Fan 6            | 13.720     | percent    | ok    | na        | na        | na        | na        | na        | na
Fans             | 0x0        | discrete   | 0x0180| na        | na        | na        | na        | na        | na
Temp 1           | 19.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 39.000    | 41.000    | 45.000
Temp 2           | 40.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 82.000    | 83.000
Temp 3           | 40.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 82.000    | 83.000
Temp 4           | 37.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 87.000    | 92.000
Temp 5           | 39.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 87.000    | 92.000
Temp 6           | 44.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 87.000    | 92.000
Temp 7           | 42.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 87.000    | 92.000
Temp 8           | 48.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 90.000    | 95.000
Temp 9           | 42.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 65.000    | 70.000
Temp 10          | 48.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 90.000    | 95.000
Temp 11          | 40.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 12          | 49.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 90.000    | 95.000
Temp 13          | na         |            | na    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 14          | na         |            | na    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 15          | na         |            | na    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 16          | na         |            | na    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 17          | na         |            | na    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 18          | na         |            | na    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 19          | 24.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 20          | 36.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 21          | 34.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 80.000    | 85.000
Temp 22          | 32.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 80.000    | 85.000
Temp 23          | 43.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 77.000    | 82.000
Temp 24          | 38.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 25          | 39.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 26          | 38.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 27          | na         |            | na    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 28          | na         |            | na    | 0.000     | 0.000     | 0.000     | 0.000     | 70.000    | 75.000
Temp 29          | 35.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 60.000    | 65.000
Temp 30          | 77.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 0.000     | 110.000   | 115.000
Memory           | 0x0        | discrete   | 0x4080| na        | na        | na        | na        | na        | na
Power Meter      | 188        | Watts      | ok    | na        | na        | na        | na        | na        | na

The data can be parsed then pushed into a logging server.

Troubleshooting

$ autoconf
configure.ac:8: error: possibly undefined macro: AM_INIT_AUTOMAKE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:9: error: possibly undefined macro: AM_CONFIG_HEADER
configure.ac:38: error: possibly undefined macro: AM_PROG_LIBTOOL

Fix this by running:

$ autoreconf -i