问题描述
2509代码,添加自定义事件,步骤如下:
1.event_def.json下版本号1.0.43改为1.0.44
2.添加事件码及建议
{ "EventCode": "0x08000029", "ReportChannel": 65535, "OldEventCode": "", "EventType": 0, "LifeCycleId": 1, "DeassertFlag": 1, "EventKeyId": "PCIeCard.PCIeCardHBMOverTemp", "SeverityId": 2, "ActionId": 0, "EventName": "PCIeCardHBMOverTemp" },{
"Suggestion": { "En": "1. Check the equipment room temperature.@#AB;2. Check for fan alarms.@#AB;3. Check for air inlet or outlet blockage.@#AB;4. Replace the pciecard where the pcie slot is located.", "Zh": "1、检查机房环境温度是否已超出设备运行环境要求。@#AB;2、检查服务器是否同时存在风扇告警。@#AB;3、检查服务器进风口/出风口是否有异物堵塞。@#AB;4、更换PCIe槽位所在的板卡。" }, "EventKeyId": "PCIeCard.PCIeCardHBMOverTemp", "Description": { "En": "The %1 %2 %3 HBM current temperature exceeds 95°C (Frequency reduction has been triggered). Error code: %4.", "Zh": "%1 PCIe卡%2(%3) HBM 的当前温度高于95℃(已触发降频)。故障码:%4。" }, "Influence": { "En": "The PCIe card may run at a reduced frequency and unstable, and the system may slow responding.", "Zh": "可能导致PCIe卡降频运行,不稳定,系统响应缓慢。" }, "Cause": { "En": "1. The ambient temperature is too high.@#AB;2. The air inlet or outlet is blocked.@#AB;3. The fan module is faulty.@#AB;4. The HBM is faulty.", "Zh": "1、环境温度过高。@#AB;2、进风口/出风口堵塞。@#AB;3、风扇模块故障。@#AB;4、PCIe card HBM故障。" } },
3.eventDefList.txt添加以下:
PCIeCard.PCIeCardHBMOverTemp
4.sr文件中添加告警事件:
“Event_PCIeCardHBMOT”: {
"EventKeyId": "PCIeCard.PCIeCardHBMOverTemp", "Condition": 1, "Reading": "<=/GPU_1.HBMOverTemperature", "OperatorId": 5, "Enabled": true, "AdditionalInfo": "2", "DescArg2": "#/Component_PCIeCard.Name", "DescArg4": "NA", "Component": "#/Component_PCIeCard" },
结果
setprop模拟事件触发,自定义事件没有被触发(概率性)

期望结果
自定义事件可以稳定触发
尝试过的解决方案
浏览相关贴发现data/opc/bmc/conf/event_def.json下没有添加的自定义事件,将添加的event_def.json文件复制到/data/opc/bmc/conf/目录下重启bmc可临时解决
所以根因是:由于/data/opt/bmc/conf/event_def.json的内容未被刷新成hpm包里的/opt/bmc/conf/event_def.json内容导致自定义事件不触发
目前做了以下测试:
1.若是/data/opt/bmc/conf/event_def.json(1.0.43)的版本号低于要刷新的hpm包里event_def.json(1.0.44)的版本号,自定义事件概率性不触发
2.若是/data/opt/bmc/conf/event_def.json(1.0.44)的版本号高于要刷新的hpm包里event_def.json(1.0.43)的版本号,/data/opt/bmc/conf/event_def.json在刷包后不会被更新成event_def.json(1.0.43)的版本号,自定义事件不触发
以上重新修改事件码和event_def.json版本号也是一样的现象
问题
1.有没有规避手段,刷包后使/data/opc/bmc/conf/event_def.json被更新生效?
2.版本号也同步更新了为什么/data/opc/bmc/conf/event_def.json文件没有被更新?