IPMI: How to use Raw IPMI Commands AN10006 Document Revision 1.0
Transcription
IPMI: How to use Raw IPMI Commands AN10006 Document Revision 1.0
IPMI: How to use Raw IPMI Commands Document Revision 1.0 November 2010 AN10006 Customer Service Contact Information: Kontron Canada, Inc. Kontron Modular Computer GMBH 4555 Rue Ambroise-Lafortune Sudetenstrasse 7 Boisbriand, Québec, Canada 87600 Kaufbeuren J7H 0A4 Germany Tel: (450) 437-5682 +49 (0) 8341 803 333 (800) 354-4223 Fax: (450) 437-8053 +49 (0) 8341 803 339 E-mail: [email protected] [email protected] Visit our web site at: www.kontron.com © 2010 Kontron, an International Corporation. All rights reserved. The information in this user's guide is provided for reference only. Kontron does not assume any liability arising out of the application or use of the information or products described herein. This user's guide may contain or reference information and products protected by copyrights or patents and do not convey any license under the patent rights of Kontron, nor the rights of others. Kontron is a registered trademark of Kontron. All trademarks, registered trademarks, and trade names used in this user's guide are the property of their respective owners. All rights reserved. Printed in Canada. This user's guide contains information proprietary to Kontron. Customers may reprint and use this user's guide in other publications. Customers may alter this user's guide and publish it only after they remove the Kontron name, cover, and logo. Kontron reserves the right to make changes without notice in product or component design as warranted by evolution in user needs or progress in engineering or manufacturing technology. Changes that affect the operation of the unit will be documented in the next revision of this user's guide. 2 AN10006 How to use Raw IPMI Commands v1.0 Table of Contents Introduction ..................................................................................................................................... 4 1) Reference Documentation ............................................................................................................ 4 2) Syntax of a raw command............................................................................................................. 5 3 AN10006 How to use Raw IPMI Commands v1.0 Introduction The goal of this document is to explain how to use raw IPMI commands. As an example, we will use ipmitool to send these commands. 1) Reference Documentation IPMI Specification: Name: IPMIv2.0 Freely available for download: http://download.intel.com/design/servers/ipmi/IPMI2_0E4_061209.pdf ATCA Specification: Name: PICMG3.0 Available at: http://www.picmg.org/ AMC Specification: Name: AMC.0 Available at: http://www.picmg.org/ 4 AN10006 How to use Raw IPMI Commands v1.0 2) Syntax of a raw command ipmitool <target options> < LUN > raw <netFN> <cmd> <data> Target options: For example: Overlan: -I lan –H <ip addr> -U admin –P admin Bridge: -b 0 -t 0x98 -m 0x8A LUN: Unless otherwise specified, the LUN is always 0 (0 will be used if -l is not specified). Other LUNs are usually used for OEM defined commands. In which case, the appropriate LUN should be mentioned. For example, the AM4204 (cavium AMC) has some OEM defined commands. See section 5.1.3 of the Technical Reference Manual: ftp://ftp.kontron.ca/Support/Products/ATCA_%28PICMG_3_xx%29/AM4204/AM4204.html It specifies to use LUN 3 (OEM LUN 2). LUN are defined in the IPMI specification: 5 AN10006 How to use Raw IPMI Commands v1.0 netFN: The Network Function is: "A field that identifies the functional class of the message. The Network Function clusters IPMI commands into different sets.” Network Functions are most commonly referred by their name. In a raw command, we must use its value as defined in the IPMI specification: 6 AN10006 How to use Raw IPMI Commands v1.0 CMD: Commands have a name and a hexadecimal identifier. The Hexadecimal identifier is defined in the ATCA and/or AMC specification. For example (From ATCA specification): Here you will find the command ID and the NetFN of each functions. An equivalent table is found in the AMC specification. The difference between both tables is that the AMC specification includes additional AMC specific commands. IMPORTANT: Some commands are optional. They are not supported by every ATCA/AMC boards. To know what is supported, most of Kontron’s Products will list the supported commands. For example, see section 4.3.1 of the AT8050’s Technical Reference Manual: ftp://ftp.kontron.ca/Support/Products/ATCA_%28PICMG_3_xx%29/AT8050/AT8050.html DATA: Each commands have are defined and have a descriptions of the DATA bytes. The descriptions are not all in the same specification. All commands are defined in the IPMI specification except for commands under netFNs 0x2C to 0x3F. netFN 0x2C (PICMG): Most of these commands are defined in the ATCA specification. Some AMC specific commands are defined in the AMC specification. netFN 0x3E (OEM): Commands under netFN 0x3E will be defined by the manufacturer. For example, see section 5.1.3 of the Technical Reference Manual: ftp://ftp.kontron.ca/Support/Products/ATCA_%28PICMG_3_xx%29/AM4204/AM4204.html 7 AN10006 How to use Raw IPMI Commands v1.0 3) Know which commands to use The name of each commands give a good general idea of the information it can provide or what it can set. You may read the command’s definition to learn more. You may also start with a known high level ipmitool command and figure out which raw commands it sends: Example: ~ # ipmitool lan set 1 access on -vvvvv Using ipmi device 0 Set IPMB address to 0x20 OpenIPMI Request Message (1 bytes) 00 Sending request to System Interface Got message: type = 1 channel = 0xf msgid = 0 netfn = 0x2d cmd = 0x1 data_len = 2 data = c100 OpenIPMI Request Message (1 bytes) 01 Sending request to System Interface Got message: type = 1 channel = 0xf msgid = 1 netfn = 0x7 cmd = 0x42 data_len = 10 data = 0001040181f21b000000 Channel type: 802.3 LAN OpenIPMI Request Message (1 bytes) 01 Sending request to System Interface Got message: type = 1 channel = 0xf msgid = 2 netfn = 0x7 cmd = 0x42 data_len = 10 data = 0001040181f21b000000 Channel type: 802.3 LAN OpenIPMI Request Message (2 bytes) 01 40 Sending request to System Interface Got message: type = 1 channel = 0xf msgid = 3 netfn = 0x7 cmd = 0x41 data_len = 3 data = 003a04 OpenIPMI Request Message (3 bytes) 01 7a 44 Sending request to System Interface Got message: type = 1 channel = 0xf msgid = 4 netfn = 0x7 cmd = 0x40 data_len = 1 data = 00 OpenIPMI Request Message (2 bytes) 01 80 Sending request to System Interface Got message: type = 1 channel = 0xf msgid = 5 netfn = 0x7 8 AN10006 How to use Raw IPMI Commands v1.0 cmd = 0x41 data_len = 3 data = 003a04 OpenIPMI Request Message (3 bytes) 01 ba 84 Sending request to System Interface Got message: type = 1 channel = 0xf msgid = 6 netfn = 0x7 cmd = 0x40 data_len = 1 data = 00 Request Message: This will only show the data bytes. Got Message: Here you will find the netfn and cmd. Note that the netFN used the send the message is not the same as in the response date (see table in section 2: NetFN). Equivalent command: ipmitool lan set 1 access on –vvvvv : ipmitool raw 0x2C 0x01 0x00 ipmitool raw 0x06 0x42 0x01 ipmitool raw 0x06 0x41 0x01 0x40 ipmitool raw 0x06 0x40 0x01 0x7A 0x44 ipmitool raw 0x06 0x41 0x01 0x80 ipmitool raw 0x06 0x40 0x01 0xBA 0x84 Not all of the above commands are useful in all situations. In this particular case, using only command: ipmitool raw 0x06 0x40 0x01 0x7A 0x44 will allow to set the access on in most applications. To understand exactly what a command does, you will need to refer to the command definition. 9 AN10006 How to use Raw IPMI Commands v1.0