Relese to version 1.3 Standard
This commit is contained in:
commit
1fbb99bb83
24
change_list.txt
Normal file
24
change_list.txt
Normal file
@ -0,0 +1,24 @@
|
||||
# Script Version 1.3 20241229
|
||||
Release Note
|
||||
1.[新增功能]支持5280m7的OCP卡的使用
|
||||
2.[新增功能]支持传感器tmp468和tmp112
|
||||
|
||||
# Script Version 1.2 20241102
|
||||
Release Note:
|
||||
1.[新增功能]支持写入板卡FRU
|
||||
2.[新增功能]添加适配服务器 donghu yichun qiandaohu
|
||||
3.[功能优化]修复一些交互类bug,增强脚本健壮性
|
||||
4.[功能优化]更便捷的支持脚本传感器名称本地化
|
||||
5.[功能优化]debug模式下执行i2c detect时可自定义执行detect内容
|
||||
|
||||
# Script Version 1.1 20240912
|
||||
Release Note:
|
||||
1.[新增功能]添加根据服务器类型适配 pcie slot 和 i2c对应关系的接口逻辑。当前可应用的服务器, 5280M7,5468M7.
|
||||
2.[新增功能]添加debug模式,通过修改变量启用debug模式:
|
||||
2.1 debug模式下, 不会执行选通9641和9548的操作,仅执行读取传感器的操作
|
||||
2.2 debug模式下, 执行detect操作仅会针对当前配置的I2C bus进行一次detect
|
||||
3.[功能优化]考虑到读取寄存器时可能也会操作fpga芯片, 为防止混淆, 修改命令cpld, 名称更改为 chip
|
||||
|
||||
# Script Version 1.0 20240614
|
||||
Release Mote:
|
||||
1.发布初版
|
||||
10
code_structure.txt
Normal file
10
code_structure.txt
Normal file
@ -0,0 +1,10 @@
|
||||
On Version V1.2
|
||||
start_get_sensor //启动读取Sensor的流程
|
||||
|--->set_configuration
|
||||
| |--->set_configuration_5280m7/5468m7/donghu/yichun //根据服务器类型设置具体I2C相关参数
|
||||
|--->get_pca9641_controll //如果服务器上有PCA9641,选通它
|
||||
|--->switch_pca9548_channel //切换9548/9546到对应的槽位上
|
||||
|--->process_sensor
|
||||
|--->sensor_init //传感器可能需要初始化
|
||||
|--->read_sensor_value //读取传感器的数值
|
||||
|--->convert_sensor_value //处理传感器的读值并做可视化处理
|
||||
1312
nicsensor.sh
Executable file
1312
nicsensor.sh
Executable file
File diff suppressed because it is too large
Load Diff
146
readme.txt
Normal file
146
readme.txt
Normal file
@ -0,0 +1,146 @@
|
||||
### 重要说明 : 脚本仅用于M7服务器,带有i2c standard tool工具的BMC使用
|
||||
### 仅限用于实验室调试使用
|
||||
|
||||
### 大纲
|
||||
一、脚本使用方法
|
||||
1.1 修改项目专属配置(必做)
|
||||
1.2 增加脚本可执行权限
|
||||
1.3 脚本命令格式
|
||||
1.4 特殊命令
|
||||
1.4.1 Detect命令
|
||||
1.4.2 fru命令
|
||||
1.4.3 读取芯片寄存器
|
||||
1.5 debug模式
|
||||
二、服务器PCIE槽位和PCA9548的channel关系
|
||||
三、M7 sysadmin用户 SSH打开方法
|
||||
四、常见问题
|
||||
|
||||
### 正文
|
||||
|
||||
一、脚本使用方法 Version1.3
|
||||
|
||||
1.1、修改项目专属配置
|
||||
针对不同项目,请先修改脚本中的部分变量(ADC128电压传感器的分压系数,INA3221的分流精密电阻阻值)
|
||||
针对不同服务器产品,请对应修改server_type变量, 当前支持设置的服务器型号:
|
||||
5280m7
|
||||
5468m7
|
||||
donghu
|
||||
yichun
|
||||
qiandaohu
|
||||
|
||||
1.2、增加脚本可执行权限
|
||||
|
||||
在脚本目录下执行命令: chmod +x ./nicsensor.sh
|
||||
|
||||
1.3、脚本命令格式
|
||||
|
||||
./nicsensor.sh <pcie_slot> <chip_type> <chip_slave>
|
||||
|
||||
参数说明:
|
||||
pcie_slot : 网卡所在的PCIE槽位, 填数字0,1,2,3,4,5
|
||||
chip_type : 传感器芯片的类型, emc1413,adc128,ina3221,tmp268,tmp112
|
||||
chip_slave: 传感器芯片的I2C地址(7bit)
|
||||
|
||||
举例说明:读取PCIE 1 上网卡的adc128芯片, 芯片slave地址为0x1f
|
||||
./nicsensor.sh 1 adc128 0x1f
|
||||
|
||||
如果需要读取OCP 0上网卡的adc128芯片,则命令需要写为:
|
||||
./nicsensor.sh ocp0 adc128 0x1f
|
||||
|
||||
1.4、特殊命令
|
||||
|
||||
1.4.1 Detect命令
|
||||
|
||||
扫描服务器的PCIE slot 0 - 5上所有的I2C设备
|
||||
|
||||
命令: ./nicsensor.sh detect
|
||||
|
||||
如果需要扫描OCP上的I2C设备,执行:
|
||||
./nicsensor.sh detect ocp
|
||||
|
||||
1.4.2 fru命令
|
||||
|
||||
命令: ./nicsensor.sh <pcie_slot> fru <chip_slave> read
|
||||
举例说明:读取Ravel板卡的EEPROM中的FRU(0x57)
|
||||
- ./nicsensor.sh 5 fru 0x57 read
|
||||
|
||||
1.4.3 读取芯片寄存器
|
||||
|
||||
命令: ./nicsensor.sh <pcie_slot> chip <chip_slave> <i2c_cmd>
|
||||
举例说明: 读取cpld的寄存器 0x00 ,读2个byte
|
||||
- ./nicsensor.sh 5 chip 0x10 "i2ctransfer -y 13 w1@0x10 0x00 r2"
|
||||
|
||||
1.5、DEBUG模式
|
||||
|
||||
可通过配置脚本中的 DEBUG_MODE 变量(In Srcipt Line:112)来使用debug模式,在debug模式下,不会执行选通
|
||||
9641,9548的操作,仅执行读取传感器的操作,因此启用debug模式后需要手动配置的变量有:
|
||||
i2c_bus
|
||||
|
||||
|
||||
二、服务器PCIE槽位和PCA9548的channel关系
|
||||
|
||||
5280M7的PCIE槽位和PCA9548/9546没有确定的对应关系,取决于使用的riser卡.根据一般情况选择的Riser卡, 对应
|
||||
情况如下:
|
||||
|
||||
PCIE 0 = i2c bus 12 , 9548channel1(0x02)
|
||||
PCIE 1 = i2c bus 12 , 9548channel2(0x04)
|
||||
PCIE 2 = i2c bus 12 , 9548channel3(0x08)
|
||||
PCIE 3 = i2c bus 13 , 9548channel1(0x02)
|
||||
PCIE 4 = i2c bus 13 , 9548channel2(0x04)
|
||||
PCIE 5 = i2c bus 13 , 9548channel3(0x08)
|
||||
|
||||
5468M7的PCIE槽位和PCA9548/9546的对应关系:
|
||||
|
||||
PCIE 0 = i2c bus 13 , 9548channel0(0x01)
|
||||
PCIE 1 = i2c bus 13 , 9548channel1(0x02)
|
||||
PCIE 2 = i2c bus 13 , 9548channel2(0x04)
|
||||
PCIE 3 = i2c bus 13 , 9548channel3(0x08)
|
||||
PCIE 4 = i2c bus 13 , 9548channel4(0x10)
|
||||
PCIE 5 = i2c bus 14 , 9548channel0(0x01)
|
||||
PCIE 6 = i2c bus 14 , 9548channel1(0x02)
|
||||
PCIE 7 = i2c bus 14 , 9548channel2(0x04)
|
||||
PCIE 8 = i2c bus 14 , 9548channel3(0x08)
|
||||
PCIE 9 = i2c bus 14 , 9548channel4(0x10)
|
||||
PCIE 10 = i2c bus 14 , 9548channel5(0x20)
|
||||
|
||||
针对不同服务器产品,请对应修改server_type变量,当前支持的服务器类型:
|
||||
5280m7
|
||||
5468m7
|
||||
|
||||
三、M7 sysadmin用户 SSH打开方法
|
||||
|
||||
5280M7服务器默认不开启SSH, 且串口通常有较多干扰打印, 因此推荐使用SSH来执行脚本, 刷新BMC镜像后需要重新配置
|
||||
|
||||
1、打开M7 BMC的串口, 可通过串口线或者IPMI SOL带外登入
|
||||
|
||||
使用IPMI SOL的前提环境: 可与BMC网络连接, 且电脑上有ipmitool工具
|
||||
SOL登陆方法:
|
||||
(1) 将SOL串口源切换到BMC:
|
||||
ipmitool -I lanplus -H <bmcip> -U admin -P admin raw 0x3c 0x2c 0x02 0x01
|
||||
(2) 打开SOL:
|
||||
ipmitool -I lanplus -H <bmcip> -U admin -P admin sol activate
|
||||
备注: <bmcip> 为目标BMC的ip地址, 请自行更改为对应的ip地址
|
||||
|
||||
2、登录进入bmc的linux系统
|
||||
|
||||
bmc linux系统的默认用户名/密码 : sysadmin/superuser
|
||||
|
||||
3、在BMC的linux系统下执行命令
|
||||
|
||||
(1) cp /etc/defconfig/ssh_server_config_with_sysadmin /etc/ssh/sshd_config
|
||||
|
||||
(2) /etc/init.d/ssh restart
|
||||
|
||||
执行完毕后,就可以使用ssh登录BMC了
|
||||
|
||||
四、常见问题
|
||||
|
||||
1、脚本执行时出现大量的 Error
|
||||
|
||||
由于M7服务器的I2C设计有PCA9641作为I2C仲裁器, 脚本执行过程中可能会被9641强行断开I2C连接, 造成大量的
|
||||
脚本Error, 这种情况在实际运行中是不可避免的, 直接重新执行脚本即可
|
||||
|
||||
2、不建议使用该脚本进行压力测试
|
||||
|
||||
由于BMC shell的版本非常原始, 没有集成高级的命令行工具, 因此处理数值时采用了复杂的脚本逻辑进行执行, 处
|
||||
理效率较低。另外由于9641芯片的存在, 不能保证压力测试的正常执行。
|
||||
Loading…
Reference in New Issue
Block a user