Refresh Types

IPMI

101

Dell DRAC and HP iLo are implementation of IPMI.
Could use embeded NIC (shared with OS)? 
Dedicated NIC provides more functionality.

when enabled, can ssh in (eg into the iDRAC port).

The standard iDRAC supports IPMI and basic web interface to look at temperature, fru status, reboot machine, etc.
The Enterprise iDRAC adds remote (GUI) console, AD-based user auth.

IPMI sol (serial over lan), isol, etc is avail from iDRAC, presumably even in standard version.


For Dell, IPMI don't seems to have way to change hyperthreading settings, not even in the delloem commands.
Disabling hyperthreading seems to req interactive BIOS changes.
Linux kernel param noht doesn't work (or was it only supposed to work at install time?)

~~
sky4-5 has decent config, bio2 don't.  
There is likely an IPMI-only w/o iDRAC on the machine as well, eg the low end 1U box

CMD


ipmitool lan print 1	# iDRAC interface (could be shared if set so).  1 refer to channel 1, which typically only channel.
ipmitool lan set   1 ipaddr  10.10.58.140 		# set iDRAC interface IP (should be, need to verify it works)
ipmitool lan set   1 defgw ipaddr  10.10.58.1		# set default gateway

ipmitool sdr		# print environment statistics
ipmitool fru	

ipmitool sol info	# supposed to provide serial over lan info 
ipmitool shell		# get to ipmi> shell so that don't have to invoke the tool each time.  it is NOT gettingo inside iDRAC shell.

ipmitool delloem lan 	# dell specific command.  lan section set whether to use dedicated NIC or shared.
			# but seems like iDRAC is configured yet this info can still be not set.
			# so iDRAC can probably speak IPMI and interfaces with it, but it is not an instance of IPMI.  
			# if work, just tell whether dedicated or shared nic
ipmitool delloem lan set dedicated	# disable use of shared IPMI.  set once iDRAC enterprise module is installed.

ipmitool delloem powermonitor	# display power usage info


ipmitool user list 1	# list users configured to use ipmi

ipmitool chassis bootdev pxe options=persistent		# change to use pxe boot by default on every boot.
ipmitool -l lan -U root -P calvin -H 10.8.1.76 chassis bootdev pxe options=persistent
		# issue the ipmi command remotely to a remote host using the remote iDRAC interface


ipmitool fru		# list all fru (eg 4 node in 2U chassis would list service tag and board serial of each node)

ipmitool dcmi set_asset_tag	# set asset tag, presumably for the whole chassis ...
ipmitool dcmi asset_tag 	# retrieve asset tag info 

ipmitool dcmi get_temp_reading	# cpu temperature
ipmitool sensor			# many sensor info, may include inlet temperature


# if IPMI isn't working, in RHEL 6, it is a kernel module that need to be started
# for machines with module:
module load shared
module load ipmitool
service ipmi start

Finding Dell Chassis ServiceTag from a node using hexcode
For dell C6320 and the like, the chassis has its own service tag.
hex code via ipmi "raw" command can retrieve them.
conversion would be needed. eg
xxd -r reverse hex conversion to ascii, avail from vim-common rpm
# Dell C6320 vintage 2017
ipmitool raw 0x30 0xc8 0x01 0x00 0x0b 0x00 0x00 0x00 | xxd -r

# additional ipmi raw command to try to get chassis code 
# The C6220II should use the same commands as the C6320, but if the system is too old the original version of this unit won’t work.
# The C6100 and C6220 do not have a unique chassis service tag to query.
# To query the Set FCB value run ALL of the following commands in this order
# (It generate and execute some sort of reservation, each command should produce some output,
# till the last one should yield a serial number of the chassis)

ipmitool raw 0x30 0xC8 0x01 0x00 0x02 0x00 0x00 0x00
ipmitool raw 0x30 0xC8 0x01 0x00 0x02 0x00 0x00 0x00 0x00
ipmitool raw 0x30 0xC8 0x01 0x00 0x02 0x00 0x00 0x00 0x01
ipmitool raw 0x30 0xC8 0x01 0x00 0x0c 0x00 0x02 0x00 0x00 0x00 | xxd -r 

Programming Dell Chassis from a node using IPMI RAW commands
While some chassis have svc tag programmed out of factory, others are not. For inventory purpose, if one wish to program in the service tag so that they can be queried. Here is an example of steps to program svc tag of "bjhkqd2" to the chassis via one of its node.
bjhkqd2 in hex is 62 6a 68 6b 71 64 32
                                                                           b    j  ...
                                                                         vvvv vvvv
ipmitool raw 0x30 0xC8 0x00 0x00 0x0B 0x00 0x00 0x00 0x0B 0x00 0x11 0x0A 0x62 0x6a 0x68 0x6b 0x71 0x64 0x32

## commit
ipmitool raw 0x30 0xC8 0x01 0x00 0x02 0x00 0x00 0x00

IPMI RAW
Dell "Using IPMITOOL RAW commands for remote management". It is pdf from dell. includes IPMI, BIOS config for SOL, escape seq keys, etc.
# raw ipmi command can potentially set what temp server shutdown when overheat
# raw cuz it is hex code being fed to the service processor.

ipmitool -I open sel list

# list raw events... maybe plaform specific.
# Over temperature raw 0x04 0x02 0x04 0x01 0x01 0x01 0x09 00 00
# Over voltage     raw 0x04 0x02 0x04 0x02 0x11 0x01 0x09 00 00

Serial over IPMI SoL
This doesn't quite redirect grub login to serial yet. But don't really want to redirect VGA to serial. Only want to spawn a serial login session so that ipmi sol can gain a login.
inittab and getty no longer works in RHEL7, below config is for systemd.
## /etc/systemd/system/mgetty.service ::

[Unit]
Description=Smart Modem Getty(mgetty)
Documentation=man:mgetty(8)
Requires=systemd-udev-settle.service
After=systemd-udev-settle.service

[Service]
Type=simple
ExecStart=/sbin/mgetty -r -s 115200 /dev/ttyS1
# -r is for direct connection (ie null modem)
Restart=always
PIDFile=/var/run/mgetty.pid.ttyS1

[Install]
WantedBy=basic.target multi-user.target

ls -Z /usr/sbin/mgetty
ls -Z /var/log/mgetty.*
chcon --type getty_exec_t /var/log/mgetty.*.log
### still need more tweaking, but don't really prevent mgetty from creating a login session.

systemctl start  mgetty.service
systemctl enable mgetty.service
# enable will create sym links in /etc/systemd/system/basic.target.wants and multi-user.target.wants

# create ipmi user #3 to have access
ipmitool user list
ipmitool user set password 3 NewIpmiPwForUserNum3	# if need to change password
ipmitool user enable 3
ipmitool channel setaccess 1 3 ipmi=on privilege=4
ipmitool user priv 3 4 1
Generic usage:
# using serial over lan (sol, ipmi 2.0)
ipmitool -H hostname -U username -P pw list 				# see list of user
ipmitool -H hostname -U username -P pw sol activate
ipmitool -I lan     -U $username -P $pass -H $nodename  sol activate		# activte serial over lan
# should drop into console.  escape seq to control IPMI session:
# ~. = exit
# ~ ^Z = suspend
# ~B = send break
# ~? = help
# Esc R Esc r Esc R = ctrl-alt-del
# Esc 1 = F1
ipmitool -I lan     -U $username -P $pass -H $nodename  sol deactivate		# disconnect prev sol, clean up measure 
Specific usage example:
csh
ipmitool -I lanplus -U root -P ipmipw -H 172.10.0.128 sol info			# 115.2 should be default speed
ipmitool -I lanplus -U root -P ipmipw -H 172.10.0.128 sol activate instance=1	# maps to /dev/ttyS1
# ~? = help (but note that ssh also use ~ as escape, so may need ~~?
# ~. = terminate session

ipmitool -I lanplus -U root -P ipmipw -H 172.10.0.128 sol deactivate # if some old session was left running
exit
rm ~/.history
ref: http://snarkybrill.blogspot.com/2015/08/mgetty-in-systemd-for-modem-dial-in.html
# http://thenetworksherpa.com/using-ipmi-serial-lan-consoles/
# ref: (for windows, but mostly applicable to linux)
# https://www.symantec.com/connect/articles/how-do-sol-serial-over-lan-aka-console-redirection-dell-servers
Remote Power Cycle using IPMI
linux machine with ipmitool (provides ipmi cli) installed, so can also do:
ipmitool -H hostname -U username -P pass power status
credentials are IDRAC credentials
*should* be blade specific when hostname is iDRAC of blade even when description say chassis.  Have not been able to get it to work.

ipmitool -I lan     -U $username -P $pass -H $nodename  mc 	info		# ipmi ver info

ipmitool -I lan     -U $username -P $pass -H $nodename  chassis power status
ipmitool -I lanplus -U $username -P $pass -H $nodename  chassis power status
ipmitool -I lanplus -U $username -P $pass -H $nodename  chassis power down
ipmitool -I lanplus -U $username -P $pass -H $nodename  chassis power on
ipmitool -I lanplus -U $username -P $pass -H $nodename  chassis power cycle

# nodename is the DNS name of the ipmi address of a host, eg ipmi-HOSTNAME 

# most of time use lanplus interface
# lan may work for some basic commands, but more sophisticated command req it to be run over lanplus
# dell def username pass is root calvin

ipmitool mc reset cold 	# reset the service processor on the node itself, cold? booting it?

# dell C6320 need the following to configure IPMI:
ipmitool delloem lan set shared with lom1


ipmitool -H 

sol payload enable 1 2
# these supposed to work, but haven't been able to get them to work :(
# may need to configure grub level serial redirect
# but realistically haven't been able to connect to serial, not just a blank screen...

Verify status
ipmitool lan print 1
ipmitool lan print | grep 'IP Address'




Ref
Solaris#IPMI



[Doc URL: http://tin6150.github.io/psg/psg/ipmi.html]
(cc) Tin Ho. See main page for copyright info.


hoti1
bofh1