ipmitool启动报错"Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0

本文详细介绍了如何在Linux系统中加载IPMI相关的五个核心模块,包括ipmi_watchdog、ipmi_poweroff、ipmi_devintf、ipmi_si和ipmi_msghandler,通过使用modprobe命令实现对这些模块的成功加载。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

先查看lsmod | grep ipmi

 

[root@localhost ~]# modprobe ipmi_watchdog
[root@localhost ~]# modprobe ipmi_poweroff
[root@localhost ~]# modprobe ipmi_devintf
[root@localhost ~]# modprobe ipmi_si
[root@localhost ~]# modprobe ipmi_msghandler

Unofficial version Rx library for Delphi 2005/2006/2007/2009/2010/XE/XE2/XE3/XE4/XE5/XE6 DISCLAIMER: * This software is provided "as is" and is without warranty of any kind. The author(s) of this software does not warrant, guarantee or make any representations regarding the use or results of use of this software in terms of reliability, accuracy or fitness for purpose. You assume the entire risk of direct or indirect, consequential or inconsequential results from the correct or incorrect usage of this software even if the author(s) has been informed of the possibilities of such damage. Neither the author(s) nor anybody connected to this software in any way can assume any responsibility. * All rights held by the author(s) or owner(s) of units or documents. _______________________________________________________________________________ Update 1.13 1/ Update for Delphi XE6 _______________________________________________________________________________ Update 1.12 1/ Update for Delphi XE5 2/ New component TRxPanel added _______________________________________________________________________________ Update 1.11 1/ Update for Delphi XE4 _______________________________________________________________________________ Update 1.10 1/ Update for Delphi XE3 _______________________________________________________________________________ Update 1.09 1/ Delphi package source actualization 2/ Delphi 6 conditional corections 3/ TRxFindFiles support class added 4/ Corrections for default (ENG) lang. resource _______________________________________________________________________________ Update 1.08 1/ file case name unit corrections. 2/ only one language file can be used in your applications like: a) in Rx.inc activate {$DEFINE _LNG_ONE_}. b) activate yours own language in new include RxLangDef.inc like {$DEFINE RXLANG_Cze}. note: Languages different from English locates in utf-8 files, may be editor problem for lower version Delphi than 2005. c) in your project use global conditional define like RXLANG_MYLANG (it activate your lang file only). d) rebuild your application, it will be smaller with one your language mutation for RxLibrary only. 3/ repair malfunction of TColor property (big thanks to Remy Lebeau). 4/ many new constant color names added into module RxColors (+ 229 named constant). 5/ new component TRxThread added for better access. 6/ repair malfunction of property caption editor. 7/ new components TRxAnimBitBtn, TRxAnimSpeedButton added. 8/ repair malfunction with styles in TRxProgress. 9/ refresh code in TRxDBGridSorter. 10/ adopted 20 function utilities by Alexey Popov into module RxProps. 11/ activate Align property in TRxSpinButton. 12/ rename parameter Name to AName in define event TExecOpenDialogEvent, because occur names conflict. 13/ repair conflict in string property in module RxTranslate for unicodes. 14/ some functions added into module RxVerInf for better work with versions. Note for users Delphi 5/6/7: ---------------------------- RxLibrary is not directly designed for this Delphi versions. When you will want compile source code in this versions of Delphi, you have to open all units contain form (*.dfm) and resave it for resource compatibility (crash prevent IDE) before rebuild and install into IDE. Some functionality will be lost. Note for users Delphi XE2 (64 bit.ver): --------------------------------------- This source code is 64 bit ready but untested. BDE packs must be removed from 64 bit project as unsuported technology. Note for users CBuilder: ------------------------ This source code is CBuilder (2006/2007) ready but uncomplete and untested yet. Releases February 29, 2012 _______________________________________________________________________________ Update 1.07 1/ Update all packages in unit scope. 2/ Change namespace in RxViewer unit for XE2. _______________________________________________________________________________ Update 1.06 1/ repair malfunction of TFormStorage under Unicode Delphi. 2/ update packages file for Delphi 2005 - XE. 3/ update package for Delphi XE2 32 bit. _______________________________________________________________________________ Update 1.05 1/ better compatibility with Delphi 2009. 2/ new adopted component for view any supported files. 3/ convert dfm files to text. _______________________________________________________________________________ Update 1.04 Updated: 1/ small mistake in RxDBCtrl.pas (wrong show DBGrid). 2/ activate tables in general RxDemo. 3/ replacement deprecated FileAge() in RxFileUtils. _______________________________________________________________________________ The initial release(s) no included
### IPMITool 参数列表及用法 `ipmitool` 是一种用于管理基于 IPMI(Intelligent Platform Management Interface)标准的硬件工具。它可以用来配置和监控服务器的各种功能,包括电源状态、传感器数据、日志记录等。 #### 基本语法 ```bash ipmitool [选项] 子命令 [参数] ``` 其中 `[选项]` 和 `子命令` 可以组合使用来完成不同的任务。 --- #### 主要选项 | 选项 | 描述 | |------|------| | `-I interface_type` 或 `--interface=interface_type` | 指定使用的接口类型,常见的有 `lan`, `lanplus`, `open` 等[^1]. | | `-H hostname` 或 `--hostname=hostname` | 指定目标主机名或 IP 地址. | | `-U username` 或 `--username=username` | 指定登录用户名[^1]. | | `-P password` 或 `--password=password` | 指定密码. | --- #### 常见子命令及其用途 ##### 1. 配置 LAN 设置 通过 `lan set` 子命令可以修改 IPMI 的网络配置。 - **设置静态 IP** ```bash ipmitool -I lanplus -H <当前IP> -U <用户名> -P <密码> lan set 1 ipsrc static ipmitool -I lanplus -H <当前IP> -U <用户名> -P <密码> lan set 1 ipaddr <新IP> ipmitool -I lanplus -H <当前IP> -U <用户名> -P <密码> lan set 1 netmask <子网掩码> ipmitool -I lanplus -H <当前IP> -U <用户名> -P <密码> lan set 1 defgw ipaddr <网关地址> ``` - **查看当前 LAN 配置** ```bash ipmitool -I lanplus -H <IP> -U <用户名> -P <密码> lan print 1 ``` ##### 2. 控制远程服务器电源 通过 `power` 子命令控制远程服务器的电源状态。 - **获取电源状态** ```bash ipmitool -I lanplus -H <IP> -U <用户名> -P <密码> power status ``` - **启动服务器** ```bash ipmitool -I lanplus -H <IP> -U <用户名> -P <密码> power on ``` - **关闭服务器** ```bash ipmitool -I lanplus -H <IP> -U <用户名> -P <密码> power off ``` - **重启服务器** ```bash ipmitool -I lanplus -H <IP> -U <用户名> -P <密码> power reset ``` ##### 3. 查看传感器信息 通过 `sdr` 子命令读取系统的传感器数据。 - **列出所有传感器** ```bash ipmitool -I lanplus -H <IP> -U <用户名> -P <密码> sdr list ``` ##### 4. 获取 SEL 日志 通过 `sel` 子命令访问系统事件日志 (System Event Log)。 - **显示 SEL 日志** ```bash ipmitool -I lanplus -H <IP> -U <用户名> -P <密码> sel list ``` - **清除 SEL 日志** ```bash ipmitool -I lanplus -H <IP> -U <用户名> -P <密码> sel clear ``` ##### 5. 用户管理 通过 `user` 子命令管理 IPMI 用户账户。 - **创建用户** ```bash ipmitool -I lanplus -H <IP> -U <用户名> -P <密码> user add <UID> <新用户名> ``` - **设置用户密码** ```bash ipmitool -I lanplus -H <IP> -U <用户名> -P <密码> user set password <UID> <新密码> ``` - **启用/禁用用户** ```bash ipmitool -I lanplus -H <IP> -U <用户名> -P <密码> channel setaccess <CID> <UID> callin=<0/1> link=<0/1> privilege=<级别> ``` ##### 6. 加载内核模块 如果遇到错误提示 “Could not open device at /dev/ipmi0...”,可能是因为缺少必要的内核模块。可以通过以下命令加载所需模块: ```bash modprobe ipmi_msghandler modprobe ipmi_devintf modprobe ipmi_si ``` 这些模块适用于大多数现代 Linux 发行版中的 2.6 内核及以上版本[^2]. --- ### 示例代码 以下是一个完整的脚本示例,展示如何批量更改多个服务器的 IPMI 配置: ```bash #!/bin/bash SERVER_LIST="server_list.txt" while read line; do IFS=' ' read -r HOST USER PASS <<< "$line" echo "Configuring $HOST..." # Set static IP configuration ipmitool -I lanplus -H $HOST -U $USER -P $PASS lan set 1 ipsrc static ipmitool -I lanplus -H $HOST -U $USER -P $PASS lan set 1 ipaddr 192.168.1.$(shuf -i 1-254 -n 1) ipmitool -I lanplus -H $HOST -U $USER -P $PASS lan set 1 netmask 255.255.255.0 ipmitool -I lanplus -H $HOST -U $USER -P $PASS lan set 1 defgw ipaddr 192.168.1.1 done < "$SERVER_LIST" ``` ---
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值