SMCIPMITool supermicro CLI utility

Common interfaces to a computer system that system administrators can use to monitor system health and manage the system

SMCIPMITool supermicro CLI utility

Postby lik » Sat Mar 10, 2012 5:05 pm

SMCIPMITool is a command line interface utility for the Supermicro SuperBlade and IPMI device.

The most useful feature which I have found handy for myself is to spawn KVM launcher directly from the CLI. Thus, no need to use web interface or launch additional applications (IPMIview, for example).
Download and unpack it to the destination directory:
Code: Select all
wget "ftp://ftp.supermicro.com/utility/SMCIPMItool/Linux/SMCIPMITool_2.11.0_bundleJRE_Linux_x64_20140704.tar.gz"

Start KVM launcher:
Code: Select all
# java -jar SMCIPMITool.jar 10.1.1.2 ADMIN ADMINPASS ukvm

Or create new IPMI user with Administrator level privileges:
Code: Select all
# java -jar SMCIPMITool.jar 10.1.1.2 ADMIN ADMINPASS user add 5 FOOUSER USERPASSWORD 4

where:
Code: Select all
# java -jar SMCIPMITool.jar 10.1.1.2 ADMIN ADMINPASS user add
Usage: user add <user id> <user name> <password> <privilege>
For privilege level:
Administrator level : 4
Operator level      : 3
User level          : 2
Callback            : 1

Basic usage syntaxt is:
Code: Select all
SMC IPMI Tool V2.11.0(Build 140704) - Super Micro Computer, Inc.
Usage:
      SMCIPMITool <IP> <username> <password> [commands ... ]

List of available commands:
Code: Select all
# java -jar SMCIPMITool.jar 10.1.1.2 ADMIN ADMINPASS
Command:
Command(s):
system                           SuperBlade system status overview
failure                          SuperBlade system failure report
blade                            SuperBlade blade management (2)
gigabit                          SuperBlade gigabit switch management (2)
power                            SuperBlade power supply management (2)
ib                               SuperBlade infiniband management (2)
cmm                              SuperBlade CMM management (2)
listtemp                         SuperBlade system temperatures
allsel <filename>                SuperBlade all Blade SEL to CSV (OEM)
burst                            SuperBlade power burst control (8)
ipmi                             IPMI device management (23)
sel                              IPMI system event log (5)
user                             IPMI user management (7)
nm                               Node Management V1.5 (16)
nm20                             Node Management V2.0 (X9 MBs) (35)
dcmi                             DCMI Management (2) 
bios                             BIOS update for X9 motherboards (8)
pminfo [<busId> <SlaAddr>]       Power supply PMBus health
psfruinfo [<busId> <SlaAddr>]    Power supply FRU health
psbbpInfo [<busId> <SlaAddr>]    Battery Backup Power status
shell                            Shell mode           
ver                              SMCIPMITool version 
list [keyword]                   List all or find available commands
exec <filename> [loop] [delay]   Execute commands from file
find [<Start> <End> <netMask>]   Find IPMI device from local or IP range
found                            found IPMI devices (6)
host                             Host management (6) 
hostrun <host|group> <command>   Run a command on host or group
mg                               Manage group command (8)
sc                               Execute shell command
ukvm                             KVM launcher (CMM,SIM,SIM(W),SIM(WA),SIM(X9))
kvm                              SIM KVM console (graphic mode)
kvmw                             SIM(W) KVM console (graphic mode)
kvmwa                            SIM(WA) KVM console (graphic mode)
kvmwx9                           SIM(X9) KVM console (graphic mode)
dr                               SIM Virtual Media Drive Redirection
vm                               SIM Virtual Media Management (4)
vmw                              SIM(W) Virtual Media
vmwa                             SIM(WA) Virtual Media
prompt <type> <on|off>           Config information displayed on prompt
tagLoc                           Tag for Location (16)
sol                              SOL Commands         
hdd                              HDD status (6)       
bbp                              Battery Backup Power Management (3)
task                             Background Task (13)


Release notes can be found at ReleaseNote.txt
lik
Founder
Founder
 
Posts: 488
Joined: Wed Dec 15, 2010 3:21 am

SMCIPMITool - upgrade IPMI firmware

Postby lik » Thu Jul 10, 2014 11:01 am

One more use case for SMCIPMITool utility is IPMI firmware upgrade.
*** preferred and recommended way to update the firmware is web interface ***

Code: Select all
# smcipmitool 10.1.1.2 ADMIN ADMINPASS ipmi ver
Firmware Revision  = 2.12
IPMI Version       = 2.0
Manufacturer ID    = 7C 2A 00
product ID         = 2B 06 00

Looks like 'product ID' value is the same for particular motherboard model. In this example '2B 06 00' corresponds to Supermicro X9SRE/X9SRE-3F/X9SRi/X9SRi-3F.
Get latest IPMI firmware for this model at Supermicro site.

Run firmware upgrade:
Code: Select all
# smcipmitool 10.1.1.2 ADMIN ADMINPASS ipmi flashh /home/ipmi/Downloads/IPMI_9SRE/SMT_X9_214.bin

This command will upload IPMI firmware image to controller, run firmware upgrade process (preserving settings) and reset BMC after successful run.
Command output:
Code: Select all
**************************************************************
WARNING!
Firmware upgrade must not be interrupted once it is started.
Once you get error after Upgrading, please use local KCS tool
for recovery.(DOS:dupdate.exe, Linux:lupdate or
Windows:wupdate.exe )
**************************************************************
Check firmware file... Done (ver:2.14)
Check BMC status... Done (ver:2.12)
Uploading...Done
Updating >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>100%
Resetting BMC
Done. (BMC needs 1 minute to restart)
Total Elapsed Time: 2 min 39 sec(s)

Check firmware version:
Code: Select all
# smcipmitool 10.1.1.2 ADMIN ADMINPASS ipmi ver
Firmware Revision  = 2.14
IPMI Version       = 2.0
Manufacturer ID    = 7C 2A 00
product ID         = 2B 06 00

We can see, that firmware upgrade was successful and firmware revision is 2.14.

Below is quick&dirty version of script which scans provided IPs/networks for open TCP 49152 port and tries to update IPMI firmware if ProductID is known:
Code: Select all
#!/bin/bash
if [ $# -lt 1 ]; then
    echo -e "Usage: $0 subnet1 subnet2 ...subnetN\nFor example: $0 192.168.1.1/24 10.10.10.10"
    exit 1
fi

while (($#)); do
    for ip in `nmap -p49152 $1 -oG - | awk '/49152\/open/ { print $2 }'`
    do
        ipmipass=`curl --connect-timeout 15 --max-time 45 -s $ip:49152/PSBlock | strings | awk 'a-->0;/ADMIN/{a=1}'`
        if [ "z$ipmipass" != "z" ]
            then
                found=false
                productid=$(smcipmitool $ip ADMIN $ipmipass ipmi ver | awk '/product ID/ { print $0 }' )
                case $productid in
                    "product ID         = 60 06 00 ")
                        product_name="X9DRD-iF"
                        firmware_bin="/home/ipmi/Downloads/IPMI_9DRD_IF/SMT_X9_317.bin"
                        found=true
                        ;;
                    "product ID         = 24 06 00 ")
                        product_name="X9SCL/X9SCM"
                        firmware_bin="/home/ipmi/Downloads/IPMI_X9SCL_M_firmware/SMT_X9_319.bin"
                        found=true
                        ;;
                    "product ID         = 03 07 00 ")
                        product_name="X9DBL-3F/X9DBL-iF"
                        firmware_bin="/home/ipmi/Downloads/IPMI_X9DBL_3F_iF_firmware/SMT_X9_317.bin"
                        found=true
                        ;;
                    "product ID         = 43 06 00 ")
                        product_name="X9SPU-F"
                        firmware_bin="/home/ipmi/Downloads/IPMI_X9SPU_F_firmware/SMT_X9_319.bin"
                        found=true
                        ;;
                    "product ID         = 06 00 00 ")
                        product_name="X8DTL"
                        firmware_bin="/home/ipmi/Downloads/IPMI_X8DTL_firmware/SMT_313.bin"
                        found=true
                        ;;
                    "product ID         = 2B 06 00 ")
                        product_name="X9SRE/X9SRE-3F/X9SRi/X9SRi-3F"
                        firmware_bin="/home/ipmi/Downloads/IPMI_X9SR_E_3F_i_i3F_firmware/SMT_X9_319.bin"
                        found=true
                        ;;
                    *)
                        echo -e "\e[31mFailed\e[0m | $ip | ADMIN | $ipmipass | Missed : $productid"
                esac
                if [ "z$found" == "ztrue" ]
                    then
                        echo -e "  \e[32mOK\e[0m   | $ip | ADMIN | $ipmipass | Found : Supermicro $product_name"
                        smcipmitool $ip ADMIN $ipmipass ipmi flashh $firmware_bin
                        sleep 90
                        smcipmitool $ip ADMIN $ipmipass ipmi ver
                        smcipmitool $ip ADMIN $ipmipass ipmi oem clrint
                        smcipmitool $ip ADMIN $ipmipass sel clear
                fi
            else
                echo -e "\e[31mFailed\e[0m | $ip | failed to obtain ADMIN password"
        fi
    done
shift
done
lik
Founder
Founder
 
Posts: 488
Joined: Wed Dec 15, 2010 3:21 am


Return to Intelligent Platform Management Interface (IPMI)

 


  • Related topics
    Replies
    Views
    Last post