Dell 服务器 IPMI 和 OMSA
2017-07-21 本文已影响252人
SateZheng
远程管理DELL服务器可通过IPMI或者OMSA的方式。
Dell OpenManage Server Administrator (OMSA)
- 通过基于网页浏览器的集成图形用户界面(GUI)
- 通过基于操作系统(OS)的命令行界面(CLI)
安装
Linux 环境可以使用 Dell的源进行yum安装,如下
# 可参考 http://zh.community.dell.com/techcenter/systems-management/w/wiki/561.omsalinux
wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
yum -y install srvadmin-all
/opt/dell/srvadmin/sbin/srvadmin-services.sh start # 启动服务,只有安装在物理机上才可启动
使用
主要是使用的命令有 omreport
、omconfig
和 racadm
。
omreport
是用来查询服务器各种硬件状态,omconfig
是用来设置硬件的一些属性的, racadm
可以用来远程控制
参考官方文档
http://www.dell.com/support/home/cn/zh/cnbsd1/product-support/product/dell-opnmang-srvr-admin-v7.3/manuals
http://www.dell.com/support/manuals/cn/zh/cnbsd1/dell-opnmang-srvr-admin-v7.3/omsa_cli-v1/%E7%AE%80%E4%BB%8B?guid=guid-800c0f9c-94f9-4893-ab05-1c3754260261&lang=zh-cn
http://www.sxszjzx.com/~t096/manual/sc/Dosa/CLI/report.htm
命令示例:
/opt/dell/srvadmin/bin/omreport chassis # 显示所有主要组件的常规状态
/opt/dell/srvadmin/bin/omreport chassis memory # 显示内存信息
/opt/dell/srvadmin/bin/omreport chassis temps # 显示系统主要组件的温度
/opt/dell/srvadmin/bin/omreport storage adisk controller=0 # 查看磁盘陈列中的硬盘状态
/opt/dell/srvadmin/bin/omreport storage pdisk controller=0 # 查看物理磁盘信息
/opt/dell/srvadmin/bin/omreport storage vdisk controller=0 # 查看虚拟硬盘的状态
/opt/dell/srvadmin/bin/omreport storage controller # 查看控制器(即RAID卡)的属性
/opt/dell/srvadmin/bin/omreport storage channel controller=0 # 查看通道的属性
/opt/dell/srvadmin/bin/omreport storage enclosure controller=0 # 查看enclosure的属性
/opt/dell/srvadmin/bin/omreport storage battery # 查看电池属性
如果要控制远程服务器,可以使用 racadm
, 命令示例如下:
# 参考文档
#http://www.dell.com/support/manuals/cn/zh/cnbsd1/idrac8-with-lc-v2.05.05.05/racadm_idrac_pub-v1/introduction?guid=guid-6b6564ab-ee63-49ef-a7d6-47154c343841&lang=en-us
# 语法
racadm -r <racIpAddr> -u <username> -p <password> <subcommand>
racadm -r <racIpAddr> -u <username> -p <password> get <devicename>.<groupname>.[<index>].[<objectname>]
racadm -r <racIpAddr> -u <username> -p <password> set <devicename>.<groupname>.[<index>].<objectname> <value>
# 常用命令
硬件资源:
racadm get BIOS.memSettings.SysMemSize # 获取内存大小
racadm get BIOS.MemSettings.SysMemSpeed # 获取内存工作速率
racadm get BIOS.MemSettings.SysMemType # 获取内存类型
BIOS相关:
racadm get BIOS.MiscSettings.ErrPrompt # 错误提示状态:
racadm set BIOS.MiscSettings.ErrPrompt Disabled # 关闭错误提示
racadm get BIOS.BiosBootSettings.BootMode(默认BIOS,另有UEFI) # BIOS启动模式:
racadm get BIOS.BiosBootSettings.BootSeq # 系统启动顺序:
racadm set BIOS.BiosBootSettings.BootSeq NIC.Integrated.1-1-1,HardDisk.List.1-1,Optical.SATAEmbedded.E-1 # 更改系统启动顺序:
jobqueue create BIOS.Setup.1-1 # 提交BIOS objects job:
racadm get BIOS.SysInformation.SystemServiceTag # 获取sn:
racadm get BIOS.SysInformation. SystemModelName # 获取型号:
racadm get BIOS.SysInformation. SystemBiosVersion # 获取bios版本:
网卡相关:
racadm getsysinfo -s ( racadm nicstatistics | racadm racdump ) # 获取网卡mac:
racadm get nic.NICConfig.3.LegacyBootProto # 获取网卡3是否开启pxe:
racadm set nic.NICConfig.3.LegacyBootProto PXE # 启用网卡pxe:
racadm jobqueue create NIC.Integrated.1-3-1 # PXE配置应用生效:
racadm jobqueue create NIC.Integrated.1-1 -r pwrcycle -s TIME_NOW -e 20120501100000 # 提交NIC objects job:
磁盘相关:
racadm storage get pdisks # 获取物理磁盘:
racadm storage get vdisks -o [ -p status,size,layout,state ] # 获取虚拟磁盘信息:
raid相关:
racadm storage get controllers # 获取raid控制器:
racadm storage get controllers -o -p name,status # 获取raid控制器属性name、status:
racadm storage resetconfig:RAID.Integrated.1-1 # 删除所有raid:
racadm jobqueue create RAID.Integrated.1-1 -s TIME_NOW -r none ( forced | pwrcycle | graceful) [ -—realtime ] # 提交storage作业:
racadm storage createvd:RAID.Integrated.1-1 -rl r5 -size 300g -pdkey:Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1 # 创建raid5,分配300G做系统:
racadm storage createvd:RAID.Integrated.1-1 -rl r5 -pdkey:Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1,Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1 # 创建raid5:
用户相关:
注:数字2、15为用户ID。
racadm get idrac.users.2 # 查看用户信息:
racadm set idrac.users.15.username chenss # 添加用户:
racadm set idrac.users.15.password wuyancs # 设置密码:
racadm set idrac.users.15.Privilege 0x1ff # 设置为idrac管理员:
racadm set idrac.users.15.enable enabled # 启用用户:
日志相关:
racadm get System.LCD.CurrentDisplay # 获取前置面板LCD显示信息:
系统相关:
racadm serveraction powerup # 开机:
racadm serveraction powerdown # 关机:
racadm serveraction powercycle # 重启:
racadm serveraction powerstatus # 状态:
racadm get iDRAC.SNMP # 获取idrac snap info:
智能平台管理接口 -IPMI(Intelligent Platform Management Interface)
本地
service ipmi start
ipmitool -I open shell # 可以直接进入本地BMC shell
远程
ipmitool -I lanplus -H IP -U**** -P***** -L USER shell # 可以进入远程BMC shell
命令
[root@zabbix ~]# ipmitool help
Commands:
raw Send a RAW IPMI request and print response # 发送一个原始的IPMI请求,并且打印回复信息
i2c Send an I2C Master Write-Read command and print response
spd Print SPD info from remote I2C device
lan Configure LAN Channels # 配置网络(lan)信道(channel)
chassis Get chassis status and set power state # 查看底盘的状态和设置电源
power Shortcut to chassis power commands
event Send pre-defined events to MC # 向BMC发送一个已经定义的事件(event),可用于测试配置的SNMP是否成功
mc Management Controller status and global enables # 查看MC(Management Contollor)状态和各种允许的项
sdr Print Sensor Data Repository entries and readings # 打印传感器仓库中的所有监控项和从传感器读取到的值。
sensor Print detailed sensor information # 打印详细的传感器信息。
fru Print built-in FRU and scan SDR for FRU locators # 打印内建的Field Replaceable Unit (FRU)信息
gendev Read/Write Device associated with Generic Device locators sdr
sel Print System Event Log (SEL) # 打印 System Event Log (SEL)
pef Configure Platform Event Filtering (PEF) # 设置 Platform Event Filtering (PEF),事件过滤平台用于在监控系统发现有event时候,用PEF中的策略进行事件过滤,然后看是否需要报警。
sol Configure and connect IPMIv2.0 Serial-over-LAN
tsol Configure and connect with Tyan IPMIv1.5 Serial-over-LAN
isol Configure IPMIv1.5 Serial-over-LAN
user Configure Management Controller users
channel Configure Management Controller channels
session Print session information
dcmi Data Center Management Interface
sunoem OEM Commands for Sun servers
kontronoem OEM Commands for Kontron devices
picmg Run a PICMG/ATCA extended cmd
fwum Update IPMC using Kontron OEM Firmware Update Manager
firewall Configure Firmware Firewall
delloem OEM Commands for Dell systems
shell Launch interactive IPMI shell
exec Run list of commands from file
set Set runtime variable for shell and exec
hpm Update HPM components using PICMG HPM.1 file
ekanalyzer run FRU-Ekeying analyzer using FRU files
ime Update Intel Manageability Engine Firmware