Commit 9750cb4
authored
[Mellanox] Redirect ethtool stderr to subprocess for better error log (sonic-net#12038)
- Why I did it
ethtool print error logs when EEPROM of a SFP is not available. It prints error like this:
INFO pmon#/supervisord: xcvrd Cannot get module EEPROM information: Input/output error
INFO pmon#/supervisord: xcvrd Cannot get Module EEPROM data: Invalid argument
However, this log does not contain the relevant SFP index which is hard for developer/qa to find the exactly SFP.
- How I did it
Redirect ethtool stderr to subprocess and log it better
- How to verify it
Manual test1 parent c674b3c commit 9750cb4
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
| 362 | + | |
| 363 | + | |
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
366 | 367 | | |
367 | 368 | | |
368 | 369 | | |
369 | 370 | | |
| 371 | + | |
370 | 372 | | |
371 | 373 | | |
372 | 374 | | |
| |||
0 commit comments