[root @ localhost〜]#yum install -y ipmitool #install this package
#service ipmi start
#ipmitool -I shell
####ローカルBMC shを直接入力できます
[root@localhost ~]# ipmitool -h
ipmitool version 1.8.18
usage: ipmitool [options...] <command>
-h This help
-V Show version information
-v Verbose (can use multiple times)
-c Display output in comma separated format
-d N Specify a /dev/ipmiN device to use (default=0)
-I intf Interface to use
-H hostname Remote host name for LAN interface
-p port Remote RMCP port [default=623]
-U username Remote session username
-f file Read remote session password from file
-z size Change Size of Communication Channel (OEM)
-S sdr Use local file for remote SDR cache
-D tty:b[:s] Specify the serial device, baud rate to use
and, optionally, specify that interface is the system one
-4 Use only IPv4
-6 Use only IPv6
-a Prompt for remote password
-Y Prompt for the Kg key for IPMIv2 authentication
-e char Set SOL escape character
-C ciphersuite Cipher suite to be used by lanplus interface
-k key Use Kg key for IPMIv2 authentication
-y hex_key Use hexadecimal-encoded Kg key for IPMIv2 authentication
-L level Remote session privilege level [default=ADMINISTRATOR]
Append a '+' to use name/privilege lookup in RAKP1
-A authtype Force use of auth type NONE, PASSWORD, MD2, MD5 or OEM
-P password Remote session password
-E Read password from IPMI_PASSWORD environment variable
-K Read kgkey from IPMI_KGKEY environment variable
-m address Set local IPMB address
-b channel Set destination channel for bridged request
-t address Bridge request to remote target address
-B channel Set transit channel for bridged request (dual bridge)
-T address Set transit address for bridge request (dual bridge)
-l lun Set destination lun for raw commands
-o oemtype Setup for OEM (use 'list' to see available OEM types)
-O seloem Use file for OEM SEL event descriptions
-N seconds Specify timeout for lan [default=2] / lanplus [default=1] interface
-R retry Set the number of retries for lan/lanplus interface [default=4]
Interfaces:
open Linux OpenIPMI Interface [default]
imb Intel IMB Interface
lan IPMI v1.5 LAN Interface
lanplus IPMI v2.0 RMCP+ LAN Interface
serial-terminal Serial Interface, Terminal Mode
serial-basic Serial Interface, Basic Mode
usb IPMI USB Interface(OEM Interface for AMI Devices)
Commands:
raw Send a RAW IPMI request and print response
i2c Send an I2C Master Write-Read command and print response
spd Print SPD info from remote I2C device
lan Configure LAN Channels
chassis Get chassis status and set power state
power Shortcut to chassis power commands
event Send pre-defined events to MC
mc Management Controller status and global enables
sdr Print Sensor Data Repository entries and readings
sensor Print detailed sensor information
fru Print built-in FRU and scan SDR for FRU locators
gendev Read/Write Device associated with Generic Device locators sdr
sel Print System Event Log (SEL)
pef Configure Platform Event Filtering (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
nm Node Manager 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
vita Run a VITA 46.11 extended cmd
lan6 Configure IPv6 LAN Channels
1.スイッチのオンとオフ、再起動
1.スイッチのステータスを確認します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)電源ステータス
2.オンにします。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)電源オン
3.シャットダウン:
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)電源オフ
4.再起動します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)電源リセット
第二に、ユーザー管理
注:[ChannelNo]フィールドはオプションです。ChannoNoは1または8です。BMCのデフォルトは2ユーザーです。ユーザーID 1の匿名ユーザー、ユーザーID 2のADMINユーザー、<>フィールドは必須コンテンツ、<権限level>:2はユーザー権限、3はオペレーター権限、4は管理者権限です。
1.ユーザー情報を表示します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)ユーザーリスト[ChannelNo]
2.ユーザーを追加します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)ユーザーセット名<user id> <username>
3.パスワードを設定します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)ユーザーセットパスワード<ユーザーID> <パスワード>
4.ユーザー権限を設定します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)user priv <ユーザーID> <権限レベル> [ChannelNo]
5.ユーザーを有効/無効にします。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)user enable / disable <user id>
3. IPネットワーク設定
注:[ChannelNo]フィールドはオプションで、ChannoNoは1(Share Nicネットワーク)または8(BMC独立管理ネットワーク)です。ネットワークパラメータを設定するには、最初にIPを静的に設定してから、他の設定を行う必要があります。
1.ネットワーク情報を表示します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)lan print [ChannelNo]
2. IPを静的モードまたはDHCPモードに変更します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)lan set <ChannelNo> ipsrc <static / dhcp>
3. IPアドレスを変更します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)lan set <ChannelNo> ipaddr <IPAddress>
4.サブネットマスクを変更します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)lan set <ChannelNo> netmask <NetMask>
5.デフォルトゲートウェイを変更します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)lan set <ChannelNo> defgw ipaddr <デフォルトゲートウェイ>
4、SOL関数
説明:<9.6 / 19.2 / 38.4 / 57.6 / 115.2>ここで、115.2は115200を表します。つまり、* 1000はボーレートです。
1. SOLシリアルポートのボーレートを設定します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)sol set volatile-bit-rate <9.6 / 19.2 / 38.4 / 57.6 / 115.2>
2. SOL機能をオンにします。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)sol activate
3. SOL機能をオフにします。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)sol deactivate
5、SELログビュー
1. SELログを表示します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)selリスト
6. FRU情報を表示する
1. FRU情報を表示します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)fruリスト
セブン、SDR、センサー情報ビュー
1. SDRセンサー情報を表示します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)sdr
2.センサー情報を表示します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)センサーリスト
8. MC(管理ユニットBMC)のステータスと制御
1. BMCを再起動します。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)mc reset <warm / cold>
9、BMC iptablesファイアウォールを設定する
1. BMCにアクセスするために特定のIPを設定します
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名パスワード)-P(BMCログインユーザー名パスワード)raw 0x32 0x76 0x01 0x01 ip1(0xa 0xa 0xa 0xa)ip2(0xb 0xb 0xb 0xb)
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)raw 0x32 0x76 0x09
2. BMCにアクセスするためのIPを設定します
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名パスワード)-P(BMCログインユーザー名パスワード)raw 0x32 0x76 0x00 0x01 ip1(0xa 0xa 0xa 0xa)
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)raw 0x32 0x76 0x09
3.設定をキャンセル
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)raw 0x32 0x76 0x08
4。ファイアウォール設定を取得する
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)raw 0x32 0x77 0x01 0x00
5.ポートをブロック/開く
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)raw 0x32 0x76 0x02 0x00 / 0x01 0x00(portno)0x22 0x00
6.ポートの設定をキャンセルします(6は5の対応するキャンセル操作です)。
ipmitool -H(BMC管理IPアドレス)-I lanplus -U(BMCログインユーザー名)-P(BMCログインユーザー名パスワード)raw 0x32 0x76 0x06 0x00 / 0x01 0x00(portno)0x22 0x00
#service ipmi start
#ipmitool -I open shell
####ローカルのBMCシェルに直接入ることができます
#ipmitool -I lan -H -U shell
####パスワードを入力してIPMIインタラクティブモードに入ります。もちろん、ここで直接シェルを変更することもできますこれはbmcコマンドであり、ipmitoolはポートをサポートしているため、最初にDNATを実行してから、イントラネットマシンをリモートで直接管理できます。
#### ipmitoolは、Windowsでipmishが提供する機能よりも多くの機能を提供します。使用方法は比較的複雑です。
以下を参照してください。コマンドの詳細については
、
抜粋された記事を参照してください。Ipmitoolローカルモニタリングコマンドが使用されます:ipmitool –I openコマンド、ここで-I openはOpenIPMIインターフェイスを使用することを意味し、コマンドには次の項目があります:
a)raw:raw IPMIリクエストを送信し、応答メッセージを出力します。 。
b)Lan:ネットワーク(lan)チャネルを構成します(
c)シャーシ:シャーシのステータスを確認し、電源を設定し
ますd)イベント:定義されたイベントをBMCに送信します。これを使用して、構成されたSNMPが成功したかどうかをテストできます
e) mc:MC(Management Contollor)のステータスと許可されているさまざまな
アイテムを表示します。
g)センサー:詳細なセンサー情報を印刷します。
h)Fru:組み込みの現場交換可能ユニット(FRU)情報を印刷します
i)Sel:システムイベントログの印刷(SEL)
j)Pef:Set Platform Event Filtering(PEF)、イベントフィルタリングプラットフォームは、モニタリングシステムがイベントを検出したときにPEFの戦略を使用してイベントをフィルターし、アラームが必要かどうかを確認するために使用されます。
k)Sol / isol:Lanをシリアルポート経由で監視するように設定するために使用されます
l)ユーザー:BMCでユーザー情報を設定します。
m)チャネル:管理コントローラーのチャネルを設定します。
Ipmitool –I open sensor listコマンドは、センサーのさまざまな監視値と、この値の監視しきい値(CPU温度、電圧、ファン速度、電源変調モジュールの温度、電源電圧など)を
取得できます。Ipmitool–I open sensor get“ 「CPU0Temp」は、CPU0Tempの監視値としてIDを取得できます。CPU0TempはセンサーのIDであり、IDはサーバーごとに異なります。
Ipmitool –Iセンサーthreshを開くID値がidと等しい監視項目のさまざまな制限値を設定します。
Ipmitool –Iシャーシステータスを開いて、シャーシの電源情報、シャーシの動作ステータスなどを含むシャーシステータスを表示します。Ipmitool –I open chassis restart_cause to view the
reason for the last system restart
Ipmitool –I open chassis policy listサポートされているシャーシの電源関連のポリシーを表示します。
Ipmitool –シャーシの電源を開いてシャーシを起動します。このコマンドを使用してリモートブートできます
Ipmitool -Iシャーシ電源をオフにしてシャーシをオフにし、このコマンドを使用して
Ipmitool -Iシャーシパワーリセットをリモートで起動してハードリスタートを実現します。このコマンドを使用して
Ipmi をリモートブートしても、システムブートデバイスを設定できます。詳細については、ipmitoolのヘルプドキュメントを参照してください。
Ipmitool –I mcリセットを開いてBMCをハードに再起動します
Ipmitool –I mc情報を開いてBMCハードウェア情報を表示します
Ipmitool –I mcを有効にします
getenables BMCのすべての許可されたオプションを一覧表示しますIpmitool –I mcを有効にしますsetenables = [オン|オフ]オプションを許可/無効にします。
Ipmitool-I open event 1高温メッセージをシステムイベントログに送信します。送信できるイベントは次のとおりです:
1温度:上限クリティカル:高くなる
2電圧しきい値:下限クリティカル:低くなる
3メモリ:
訂正可能なECCエラーが検出されたIpmitool -I open eventコマンドを使用して、構成されたIPMIのsnmp機能が成功したかどうかをテストできます。
Ipmitool -I open lan print 1チャネル1の情報を印刷します。
Ipmitool -I open lan set 1 ipaddr 10.10.113.95はチャネル1のアドレスを10.10.113.95に設定し
ますIpmitool -I open lan set 1 snmp publicはチャネル1のsnmpのコミュニティをpublicに設定します。
Ipmitool -Iセットチャネル1でlan set 1アクセスを開いてアクセスを許可します。
Ipmitool -I pef infoを開き、プラットフォームイベントフィルタリング(pef)情報を
出力しますIpmitool -I pefステータスを開きますプラットフォームイベントフィルタリング(pef)ステータスを表示します
Ipmitool -I pefポリシーを開き、プラットフォームイベントフィルタリング(pef)ポリシー設定を
表示しますIpmitool -I sdr list fruを開きますfru情報を読み取って表示します。
[root @ localhost〜]#yum install -y ipmitool #install this package
電力関連:
#電源を入れる
ipmitool -I lanplus -H 10.41.1.41 -U root -P root power on
#電源を切る
ipmitool -I lanplus -H 10.41.1.41 -U root -P root power off
#電源を再起動します
ipmitool -I lanplus -H 10.41.1.41 -U root -P root power reset
#電源ステータスを表示する
ipmitool -I lanplus -H 10.41.1.41 -U root -P root power status
スタートアップ関連:
#BIOSブートに設定
ipmitool -I lanplus -H 10.41.1.41 -U root -P root chassis bootparam set bootflag force_bios
#pxe startに設定
ipmitool -I lanplus -H 10.41.1.41 -U root -P root chassis bootparam set bootflag force_pxe
#CDブートに設定
ipmitool -I lanplus -H 10.41.1.41 -U root -P root chassis bootparam set bootflag force_cdrom
#ハードディスクブートに設定
ipmitool -I lanplus -H 10.41.1.41 -U root -P root chassis bootparam set bootflag force_disk
#BMCを再起動
ipmitool -I lanplus -H 10.41.1.41 -U root -P root mc reset cold
#BMCパスワードを変更する
ipmitool -I lanplus -H 10.41.1.41 -U root -P root user set password 2 new_password #new_passwordこれは新しいパスワードです
#リモートテキストリダイレクトサーバーを再起動して画面を表示します
ipmitool -I lanplus-H 10.41.1.41 -U root -P root sol activate
#このエラーがある場合情報:SOLペイロードは別のセッションですでにアクティブです
ipmitool -I lanplus-H 10.41.1.41 -U root -P root sol deactivate#このコマンドは他の人のセッションを開始します
#Macアドレスの取得一部のモデルでは許可されていません。これはデルのサーバーです。Huaweiサーバーも使用できます
"" "ipmitool -I lanplus -H 10.41.1.41 -U root -P root lan print | grep" MAC Address "| awk '{print $ NF}'" ""