Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Provide additional config and enhancements to Rackmon logic to support ORV3 for Darwin. Darwin is the only platform so far to support Rackmon from FBOSS. Pull Request resolved: #288 Test Plan: 1. On a Darwin system connected to PSUs and BBUs, used the thriftctl utility to verify rackmon was monitoring the devices: ``` [root@rkdo301 ~]# thriftctl listPorts 5909: neteng.fboss.ctrl.FbossCtrl 5910: neteng.fboss.qsfp.QsfpService 5931: neteng.fboss.hw_ctrl.FbossHwCtrl 5932: neteng.fboss.hw_ctrl.FbossHwCtrl 5970: neteng.fboss.platform.sensor_service.SensorServiceThrift 5972: fan_service.FanService 5973: rackmonsvc.rackmonsvc.RackmonCtrl [root@rkdo301 ~]# thriftctl listMethods -p 5973 Found 10 available methods under port:5973 controlRackmond getMonitorData getMonitorDataEx getPowerLossSiren listModbusDevices presetMultipleRegisters readFileRecord readHoldingRegisters reload writeSingleRegister [root@rkdo301 ~]# thriftctl request listModbusDevices -p 5973 [ModbusDeviceInfo( devAddress=64, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=3), ModbusDeviceInfo( devAddress=65, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=3), ModbusDeviceInfo( devAddress=66, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=3), ModbusDeviceInfo( devAddress=67, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=3), ModbusDeviceInfo( devAddress=68, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=3), ModbusDeviceInfo( devAddress=69, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=3), ModbusDeviceInfo( devAddress=96, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=3), ModbusDeviceInfo( devAddress=97, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=3), ModbusDeviceInfo( devAddress=98, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=3), ModbusDeviceInfo( devAddress=99, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=3), ModbusDeviceInfo( devAddress=100, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=3), ModbusDeviceInfo( devAddress=101, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=3), ModbusDeviceInfo( devAddress=200, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=1), ModbusDeviceInfo( devAddress=201, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=1), ModbusDeviceInfo( devAddress=202, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=1), ModbusDeviceInfo( devAddress=203, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=1), ModbusDeviceInfo( devAddress=204, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=1), ModbusDeviceInfo( devAddress=205, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=1), ModbusDeviceInfo( devAddress=232, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=1), ModbusDeviceInfo( devAddress=233, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=1), ModbusDeviceInfo( devAddress=234, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=1), ModbusDeviceInfo( devAddress=235, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=1), ModbusDeviceInfo( devAddress=236, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=1), ModbusDeviceInfo( devAddress=237, mode=0, baudrate=19200, timeouts=0, crcErrors=0, miscErrors=0, deviceType=1)] [root@rkdo301 ~]# thriftctl request getMonitorData -p 5973 > /tmp/monitordata.txt ``` 2. Ran the rackmon_test on a Darwin system: ``` [root@rkd205 ~]# /tmp/rackmon_test --gtest_filter=RackmonConfig.RegisterMap Running main() from gmock_main.cc Note: Google Test filter = RackmonConfig.RegisterMap [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from RackmonConfig [ RUN ] RackmonConfig.RegisterMap [ OK ] RackmonConfig.RegisterMap (1 ms) [----------] 1 test from RackmonConfig (1 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (1 ms total) [ PASSED ] 1 test. ``` Monitored data is attached to this PR. [rackmondata.txt](https://github.com/user-attachments/files/17637889/rackmondata.txt) Reviewed By: amithash Differential Revision: D65801239 Pulled By: joancaneus fbshipit-source-id: d5bda7f9aa54e21d0c18828f338ab6d5feb51b19
- Loading branch information