Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DARWIN: update fan_service.json #270

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

adamcalabrigo
Copy link
Contributor

Description

Updates fan_service.json for DARWIN platform with the following changes:

  1. Fix scale factor for TH3 diode temp sensors. Currently, the raw value is scaled by sensor_service, then again here, resulting in erroneously low readings. Leave it to sensor_service to scale sensors.
  2. Add Rackmon fan as fan6 to ensure that fan_service is driving its PWM correctly.

Test Plan

Tested on Darwin with Linux kernel 6.4 and CentOS 9.

fan_service runs correctly, sensor scale is correct and all fan RPMs and LEDs are updated:

I1015 02:05:21.869820 10429 Utils.cpp:139] The config is valid
I1015 02:05:21.871098 10429 ControlLogic.cpp:68] Upon fan_service start up, program all fan pwm with transitional value of 50
I1015 02:05:21.872616 10429 ControlLogic.cpp:443] fan_1: Programmed with PWM 50 (raw value 128)
I1015 02:05:21.874653 10429 ControlLogic.cpp:443] fan_2: Programmed with PWM 50 (raw value 128)
I1015 02:05:21.876638 10429 ControlLogic.cpp:443] fan_3: Programmed with PWM 50 (raw value 128)
I1015 02:05:21.878667 10429 ControlLogic.cpp:443] fan_4: Programmed with PWM 50 (raw value 128)
I1015 02:05:21.880649 10429 ControlLogic.cpp:443] fan_5: Programmed with PWM 50 (raw value 128)
I1015 02:05:21.884615 10429 ControlLogic.cpp:443] fan_6: Programmed with PWM 50 (raw value 128)
...
I1015 02:05:28.620519 10441 Bsp.cpp:303] Got sensor data from sensor_service.  Item count: 90
I1015 02:05:28.620554 10441 ControlLogic.cpp:99] Successfully fetched sensor data.
I1015 02:05:28.620949 10441 ControlLogic.cpp:109] Successfully fetched optics data.
I1015 02:05:28.620955 10441 ControlLogic.cpp:571] Processing Sensors ...
I1015 02:05:28.620978 10441 ControlLogic.cpp:220] SC_TH3_DIODE1_TEMP: Calculated PWM is 24
I1015 02:05:28.621008 10441 ControlLogic.cpp:220] SC_TH3_DIODE2_TEMP: Calculated PWM is 24
I1015 02:05:28.621013 10441 ControlLogic.cpp:575] Processing Optics ...
I1015 02:05:28.621017 10441 ControlLogic.cpp:579] Processing Fans ...
I1015 02:05:28.622292 10441 ControlLogic.cpp:365] fan_1: is present in the host (through sysfs)
I1015 02:05:28.626693 10441 ControlLogic.cpp:168] fan_1: RPM read is 12145
I1015 02:05:28.627689 10441 ControlLogic.cpp:365] fan_2: is present in the host (through sysfs)
I1015 02:05:28.631686 10441 ControlLogic.cpp:168] fan_2: RPM read is 11904
I1015 02:05:28.632671 10441 ControlLogic.cpp:365] fan_3: is present in the host (through sysfs)
I1015 02:05:28.636684 10441 ControlLogic.cpp:168] fan_3: RPM read is 12048
I1015 02:05:28.637642 10441 ControlLogic.cpp:365] fan_4: is present in the host (through sysfs)
I1015 02:05:28.641644 10441 ControlLogic.cpp:168] fan_4: RPM read is 12295
I1015 02:05:28.642640 10441 ControlLogic.cpp:365] fan_5: is present in the host (through sysfs)
I1015 02:05:28.646643 10441 ControlLogic.cpp:168] fan_5: RPM read is 12048
I1015 02:05:28.646690 10441 ControlLogic.cpp:365] fan_6: is present in the host (through sysfs)
I1015 02:05:28.651575 10441 ControlLogic.cpp:168] fan_6: RPM read is 11611
I1015 02:05:28.651593 10441 ControlLogic.cpp:631] Boost mode enabled for optics update missing for 1728957928s
I1015 02:05:28.651601 10441 ControlLogic.cpp:500] zone1: Components: SC_TH3_DIODE1_TEMP,SC_TH3_DIODE2_TEMP,qsfp_group_1. Aggregation Type: ZONE_TYPE_MAX. Aggregate PWM is 60.
I1015 02:05:28.653653 10441 ControlLogic.cpp:443] fan_1: Programmed with PWM 53 (raw value 135)
I1015 02:05:28.655634 10441 ControlLogic.cpp:443] fan_2: Programmed with PWM 53 (raw value 135)
I1015 02:05:28.657638 10441 ControlLogic.cpp:443] fan_3: Programmed with PWM 53 (raw value 135)
I1015 02:05:28.659618 10441 ControlLogic.cpp:443] fan_4: Programmed with PWM 53 (raw value 135)
I1015 02:05:28.661608 10441 ControlLogic.cpp:443] fan_5: Programmed with PWM 53 (raw value 135)
I1015 02:05:28.665609 10441 ControlLogic.cpp:443] fan_6: Programmed with PWM 53 (raw value 135)
I1015 02:05:28.665653 10441 ControlLogic.cpp:463] fan_1: Setting LED to Good (value: 2)
I1015 02:05:28.665672 10441 ControlLogic.cpp:463] fan_2: Setting LED to Good (value: 2)
I1015 02:05:28.665686 10441 ControlLogic.cpp:463] fan_3: Setting LED to Good (value: 2)
I1015 02:05:28.665699 10441 ControlLogic.cpp:463] fan_4: Setting LED to Good (value: 2)
I1015 02:05:28.665711 10441 ControlLogic.cpp:463] fan_5: Setting LED to Good (value: 2)
I1015 02:05:28.669580 10441 ControlLogic.cpp:463] fan_6: Setting LED to Good (value: 2)

@facebook-github-bot
Copy link
Contributor

@joancaneus has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants