[platform]:Fix as7726 read thermal sensor issue#4135
Merged
lguohan merged 2 commits intosonic-net:masterfrom Feb 13, 2020
Merged
[platform]:Fix as7726 read thermal sensor issue#4135lguohan merged 2 commits intosonic-net:masterfrom
lguohan merged 2 commits intosonic-net:masterfrom
Conversation
jleveque
suggested changes
Feb 11, 2020
platform/broadcom/sonic-platform-modules-accton/as7726-32x/classes/thermalutil.py
Outdated
Show resolved
Hide resolved
jleveque
approved these changes
Feb 12, 2020
Contributor
|
Retest this please |
stepanblyschak
pushed a commit
to stepanblyschak/sonic-buildimage
that referenced
this pull request
Feb 26, 2020
Due to linux create hwmonN node number, N isn't fixed. So modify to use "" to let thermal.py can correct sysfs. For example, use /sys/bus/i2c/devices/55-0048/hwmon/hwmon/temp1_input to instead of /sys/bus/i2c/devices/55-0048/hwmon/hwmon4/temp1_input
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.
- What I did
Fix as7726 read thermal sensor issue.
- How I did it
Due to linux create hwmonN node number, N isn't fixed. So modify to use "" to let thermal.py can correct sysfs. For example, use /sys/bus/i2c/devices/55-0048/hwmon/hwmon/temp1_input to instead of /sys/bus/i2c/devices/55-0048/hwmon/hwmon4/temp1_input
- How to verify it
Reboot DUT, and check as7726-32x-platform-monitor.service.
root@sonic:/home/admin# systemctl status as7726-32x-platform-monitor.service -l
● as7726-32x-platform-monitor.service - Accton AS7726-32X Platform Monitoring se
Loaded: loaded (/lib/systemd/system/as7726-32x-platform-monitor.service; enab
Active: active (running) since Mon 2020-02-10 06:54:34 UTC; 1min 10s ago
Process: 640 ExecStartPre=/usr/local/bin/accton_as7726_32x_util.py install
For error case, that will log as below ,
Feb 10 03:50:30 sonic accton_as7726_32x_monitor.py[7998]: No such device_path=/s**
Feb 10 03:50:30 sonic accton_as7726_32x_monitor.py[7998]: No such device_path=/s**
Feb 10 03:50:30 sonic accton_as7726_32x_monitor.py[7998]: No such device_path=/s**
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)