to add fan speed display in rpm, as of now it display only in percent - #753
Open
meetshamsher wants to merge 2 commits into
Open
to add fan speed display in rpm, as of now it display only in percent#753meetshamsher wants to merge 2 commits into
meetshamsher wants to merge 2 commits into
Conversation
Signed-off-by: Sardar Shamsher Singh <meetshamsher@gmail.com>
|
|
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Signed-off-by: Sardar Shamsher Singh <meetshamsher@gmail.com>
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Collaborator
|
Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks! ---Powered by SONiC BuildBot
|
Author
|
@maintainer Please add reviewer for this PR. It seems I don't have permission to add any reviewer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Sardar Shamsher Singh meetshamsher@gmail.com
Description
Motivation and Context
How Has This Been Tested?
Loaded image in local target and checked for rdis-db data population as show below:
Note: the setup contains two PSU and 4 Fan tray with each two fans.
root@sonic:/home/admin# sonic-db-cli STATE_DB KEYS 'FAN_INFO|' | sort | while read -r k; do printf '%-28s %s\n' "$k" "$(sonic-db-cli STATE_DB HGET "$k" speed_rpm)"; done
FAN_INFO|fantray1.fan1 12134
FAN_INFO|fantray1.fan2 10325
FAN_INFO|fantray2.fan1 12026
FAN_INFO|fantray2.fan2 10305
FAN_INFO|fantray3.fan1 12162
FAN_INFO|fantray3.fan2 10285
FAN_INFO|fantray4.fan1 12053
FAN_INFO|fantray4.fan2 10246
FAN_INFO|PSU1.fan1 10080
FAN_INFO|PSU2.fan1 9952
root@sonic:/home/admin#
root@sonic:/home/admin# for k in $(sonic-db-cli STATE_DB KEYS "FAN_INFO|"); do echo "=== $k ==="; sonic-db-cli STATE_DB HGETALL "$k"; echo; done
=== FAN_INFO|PSU1.fan1 ===
{'presence': 'True', 'status': 'True', 'direction': 'N/A', 'speed': '50', 'speed_rpm': '10080', 'timestamp': '20260602 11:06:27', 'led_status': 'N/A', 'drawer_name': 'N/A', 'model': 'NXA-PAC-500W-PE', 'serial': 'LIT2709A9HY', 'speed_target': '50', 'is_under_speed': 'False', 'is_over_speed': 'False', 'is_replaceable': 'False'}
=== FAN_INFO|fantray1.fan1 ===
{'presence': 'True', 'drawer_name': 'fantray1', 'model': 'NXA-SFAN-35CFM-PE', 'serial': 'DCH2936TJEW25372537A0', 'status': 'True', 'direction': 'exhaust', 'speed': '49', 'speed_rpm': '12134', 'speed_target': '53', 'is_under_speed': 'False', 'is_over_speed': 'False', 'is_replaceable': 'False', 'timestamp': '20260602 11:06:27', 'led_status': 'green'}
=== FAN_INFO|fantray2.fan2 ===
{'presence': 'True', 'drawer_name': 'fantray2', 'model': 'NXA-SFAN-35CFM-PE', 'serial': 'DCH2936TJ9625372537A0', 'status': 'True', 'direction': 'exhaust', 'speed': '49', 'speed_rpm': '10305', 'speed_target': '53', 'is_under_speed': 'False', 'is_over_speed': 'False', 'is_replaceable': 'False', 'timestamp': '20260602 11:06:27', 'led_status': 'green'}
=== FAN_INFO|PSU2.fan1 ===
{'presence': 'True', 'status': 'True', 'direction': 'N/A', 'speed': '50', 'speed_rpm': '9952', 'timestamp': '20260602 11:06:27', 'led_status': 'N/A', 'drawer_name': 'N/A', 'model': 'NXA-PAC-500W-PE', 'serial': 'LIT2709A9DV', 'speed_target': '50', 'is_under_speed': 'False', 'is_over_speed': 'False', 'is_replaceable': 'False'}
=== FAN_INFO|fantray2.fan1 ===
{'presence': 'True', 'drawer_name': 'fantray2', 'model': 'NXA-SFAN-35CFM-PE', 'serial': 'DCH2936TJ9625372537A0', 'status': 'True', 'direction': 'exhaust', 'speed': '49', 'speed_rpm': '12026', 'speed_target': '53', 'is_under_speed': 'False', 'is_over_speed': 'False', 'is_replaceable': 'False', 'timestamp': '20260602 11:06:27', 'led_status': 'green'}
=== FAN_INFO|fantray3.fan1 ===
{'presence': 'True', 'drawer_name': 'fantray3', 'model': 'NXA-SFAN-35CFM-PE', 'serial': 'DCH2936TJZK25372537A0', 'status': 'True', 'direction': 'exhaust', 'speed': '49', 'speed_rpm': '12162', 'speed_target': '53', 'is_under_speed': 'False', 'is_over_speed': 'False', 'is_replaceable': 'False', 'timestamp': '20260602 11:06:27', 'led_status': 'green'}
=== FAN_INFO|fantray4.fan2 ===
{'presence': 'True', 'drawer_name': 'fantray4', 'model': 'NXA-SFAN-35CFM-PE', 'serial': 'DCH2936TJZT25372537A0', 'status': 'True', 'direction': 'exhaust', 'speed': '48', 'speed_rpm': '10246', 'speed_target': '53', 'is_under_speed': 'False', 'is_over_speed': 'False', 'is_replaceable': 'False', 'timestamp': '20260602 11:06:27', 'led_status': 'green'}
=== FAN_INFO|fantray4.fan1 ===
{'presence': 'True', 'drawer_name': 'fantray4', 'model': 'NXA-SFAN-35CFM-PE', 'serial': 'DCH2936TJZT25372537A0', 'status': 'True', 'direction': 'exhaust', 'speed': '49', 'speed_rpm': '12053', 'speed_target': '53', 'is_under_speed': 'False', 'is_over_speed': 'False', 'is_replaceable': 'False', 'timestamp': '20260602 11:06:27', 'led_status': 'green'}
=== FAN_INFO|fantray1.fan2 ===
{'presence': 'True', 'drawer_name': 'fantray1', 'model': 'NXA-SFAN-35CFM-PE', 'serial': 'DCH2936TJEW25372537A0', 'status': 'True', 'direction': 'exhaust', 'speed': '49', 'speed_rpm': '10325', 'speed_target': '53', 'is_under_speed': 'False', 'is_over_speed': 'False', 'is_replaceable': 'False', 'timestamp': '20260602 11:06:27', 'led_status': 'green'}
=== FAN_INFO|fantray3.fan2 ===
{'presence': 'True', 'drawer_name': 'fantray3', 'model': 'NXA-SFAN-35CFM-PE', 'serial': 'DCH2936TJZK25372537A0', 'status': 'True', 'direction': 'exhaust', 'speed': '49', 'speed_rpm': '10285', 'speed_target': '53', 'is_under_speed': 'False', 'is_over_speed': 'False', 'is_replaceable': 'False', 'timestamp': '20260602 11:06:27', 'led_status': 'green'}
root@sonic:/home/admin#
Additional Information (Optional)
Related sonic-platform-daemons change PR: sonic-net/sonic-platform-daemons#888