sonic-buildimage
sonic-buildimage copied to clipboard
[Edgecore][AS9716/PDDF] Enhance sonic_platform feature and Fan-WDT
Why I did it
- Enhance sonic_platform and support multi psu model and psu-fan direction.
- Implement fan-wdt feature.
- Add coretemp to pddf-devicd.json
- Define temp label to sensors.
How I did it
Implement need code and test.
How to verify it
Test show cmd to verify. lm75-i2c-18-4a Adapter: i2c-1-mux (chan_id 1) MB_LeftCenter_temp: +27.0 C (high = +80.0 C, hyst = +75.0 C)
lm75-i2c-18-4e Adapter: i2c-1-mux (chan_id 1) FB_1_temp: +26.5 C (high = +80.0 C, hyst = +75.0 C)
fan_ctrl-i2c-17-66 Adapter: i2c-1-mux (chan_id 0) fan1: 5700 RPM fan2: 5900 RPM fan3: 5500 RPM fan4: 5800 RPM fan5: 5700 RPM fan6: 5900 RPM fan7: 5800 RPM fan8: 6000 RPM fan9: 5600 RPM fan10: 5900 RPM fan11: 5700 RPM fan12: 5900 RPM
lm75-i2c-18-4b Adapter: i2c-1-mux (chan_id 1) CB_temp: +27.5 C (high = +80.0 C, hyst = +75.0 C)
psu_pmbus-i2c-10-59 Adapter: i2c-1-mux (chan_id 1) in3: 12.06 V fan1: 13888 RPM temp1: +27.0 C power2: 214.00 W curr2: 17.72 A
psu_pmbus-i2c-9-58 Adapter: i2c-1-mux (chan_id 0) in3: 65.53 kV fan1: 0 RPM temp1: +0.0 C power2: 0.00 W curr2: 0.00 A
pch_haswell-virtual-0 Adapter: Virtual device temp1: +38.5 C
lm75-i2c-18-49 Adapter: i2c-1-mux (chan_id 1) MB_RightCenter_temp: +30.0 C (high = +80.0 C, hyst = +75.0 C)
lm75-i2c-18-4f Adapter: i2c-1-mux (chan_id 1) FB_2_temp: +31.5 C (high = +80.0 C, hyst = +75.0 C)
lm75-i2c-18-48 Adapter: i2c-1-mux (chan_id 1) MB_FrontMiddle_temp: +27.5 C (high = +80.0 C, hyst = +75.0 C)
lm75-i2c-18-4c Adapter: i2c-1-mux (chan_id 1) OCXO_temp: +31.0 C (high = +80.0 C, hyst = +75.0 C)
coretemp-isa-0000 Adapter: ISA adapter Package id 0: +45.0 C (high = +82.0 C, crit = +104.0 C) Core 0: +45.0 C (high = +82.0 C, crit = +104.0 C) Core 1: +45.0 C (high = +82.0 C, crit = +104.0 C) Core 2: +45.0 C (high = +82.0 C, crit = +104.0 C) Core 3: +45.0 C (high = +82.0 C, crit = +104.0 C)
root@sonic:/home/admin# ls fan.py sonic_platform-1.0-py3-none-any.whl pddf-device.json sonic-platform-accton-as9716-32d_1.1_amd64.deb pd-plugin.json sonic-platform-pddf_1.1_amd64.deb pmon_daemon_control.json sonic-platform-pddf-sym_1.1_amd64.deb sensors.conf sonic_platform.tgz sonic_platform system_health_monitoring_config.json root@sonic:/home/admin# root@sonic:/home/admin# root@sonic:/home/admin# root@sonic:/home/admin# root@sonic:/home/admin# root@sonic:/home/admin# show platform temp Sensor Temperature High TH Low TH Crit High TH Crit Low TH Warning Timestamp
CB_temp(0x4b) 27.5 80 N/A N/A N/A False 20230220 09:52:37
FB_1_temp(0x4e) 27 80 N/A N/A N/A False 20230220 09:52:37
FB_2_temp(0x4f) 31.5 80 N/A N/A N/A False 20230220 09:52:37
MB_FrontMiddle_temp(0x48) 27 80 N/A N/A N/A False 20230220 09:52:37 MB_LeftCenter_temp(0x4a) 27.5 80 N/A N/A N/A False 20230220 09:52:37 MB_RightCenter_temp(0x49) 30 80 N/A N/A N/A False 20230220 09:52:37 OCXO_temp(0x4c) 31 80 N/A N/A N/A False 20230220 09:52:37 PSU-1 temp sensor 1 26 80 N/A N/A N/A False 20230220 09:52:37 PSU-2 temp sensor 1 0 80 N/A N/A N/A False 20230220 09:52:37 coretemp-isa-0000 38.5 82 N/A 104.0 N/A False 20230220 09:52:37 root@sonic:/home/admin# root@sonic:/home/admin# show platform fan Drawer LED FAN Speed Direction Presence Status Timestamp
FanTray1 green FAN-1F 50% exhaust Present OK 20230220 09:52:36 FanTray1 green FAN-1R 50% exhaust Present OK 20230220 09:52:36 FanTray2 green FAN-2F 50% exhaust Present OK 20230220 09:52:36 FanTray2 green FAN-2R 50% exhaust Present OK 20230220 09:52:36 FanTray3 green FAN-3F 50% exhaust Present OK 20230220 09:52:36 FanTray3 green FAN-3R 50% exhaust Present OK 20230220 09:52:36 FanTray4 green FAN-4F 50% exhaust Present OK 20230220 09:52:36 FanTray4 green FAN-4R 50% exhaust Present OK 20230220 09:52:36 FanTray5 green FAN-5F 50% exhaust Present OK 20230220 09:52:36 FanTray5 green FAN-5R 50% exhaust Present OK 20230220 09:52:36 FanTray6 green FAN-6F 50% exhaust Present OK 20230220 09:52:36 FanTray6 green FAN-6R 50% exhaust Present OK 20230220 09:52:36 N/A N/A PSU-1 FAN-1 77% exhaust Present OK 20230220 09:52:36 N/A N/A PSU-2 FAN-1 0% False Present Not OK 20230220 09:52:37 root@sonic:/home/admin# root@sonic:/home/admin# show platform psustatus PSU Model Serial HW Rev Voltage (V) Current (A) Power (W) Status LED
PSU 1 YESM1300AM-2A01P10 S0A000X601919000007 N/A 12.041 16.718 201.0 OK green PSU 2 N/A N/A N/A N/A N/A N/A NOT PRESENT off root@sonic:/home/admin# root@sonic:/usr/local/bin# pddf_psuutil mfrinfo PSU Status Manufacturer ID Model Serial Fan Airflow Direction
PSU-1 OK 3Y POWER YESM1300AM-2A01P10 S0A000X601919000007 exhaust PSU-2 NOT PRESENT N/A N/A N/A N/A
Which release branch to backport (provide reason below if selected)
- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
- [ ] 202211