Skip to content

Commit a68d3d3

Browse files
Collect module EEPROM data in dump (sonic-net#3009)
* Collect module EEPROM data in dump
1 parent e7a8def commit a68d3d3

4 files changed

Lines changed: 475 additions & 96 deletions

File tree

doc/Command-Reference.md

Lines changed: 105 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@
203203
* [MACsec show command](#macsec-show-command)
204204
* [MACsec clear command](#macsec-clear-command)
205205
* [SFP Utilities Commands](#sfp-utilities-commands)
206+
* [SFP Utilities show commands](#sfp-utilities-show-commands)
206207
* [SFP Utilities read command](#sfp-utilities-read-command)
207208
* [SFP Utilities write command](#sfp-utilities-write-command)
208209
* [Static DNS Commands](#static-dns-commands)
@@ -12914,8 +12915,111 @@ Clear MACsec counters which is to reset all MACsec counters to ZERO.
1291412915
Go Back To [Beginning of the document](#) or [Beginning of this section](#macsec-commands)
1291512916
1291612917
# SFP Utilities Commands
12918+
This sub-section explains the list of commands available for SFP utilities feature.
1291712919
12918-
This sub-section explains the list of commands available for SFP utilities feature.
12920+
## SFP Utilities show commands
12921+
12922+
- Show SFP EEPROM hex dump
12923+
12924+
```
12925+
admin@sonic:~$ sfputil show eeprom-hexdump --help
12926+
Usage: sfputil show eeprom-hexdump [OPTIONS]
12927+
Display EEPROM hexdump of SFP transceiver(s)
12928+
Options:
12929+
-p, --port <port_name> Display SFP EEPROM hexdump for port <port_name>
12930+
-n, --page <page_number> Display SFP EEEPROM hexdump for
12931+
<page_number_in_hex>
12932+
--help Show this message and exit.
12933+
```
12934+
12935+
```
12936+
admin@sonic:~$ sfputil show eeprom-hexdump --port Ethernet0 --page 0
12937+
EEPROM hexdump for port Ethernet0 page 0h
12938+
Lower page 0h
12939+
00000000 18 30 80 03 00 00 00 00 00 00 00 00 00 00 00 00 |.0..............|
12940+
00000010 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 |................|
12941+
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12942+
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12943+
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12944+
00000050 00 00 00 00 00 03 1d 01 88 01 1c 01 44 11 1b 01 |............D...|
12945+
00000060 22 55 1a 01 44 11 18 01 11 ff 17 01 44 11 16 01 |"U..D.......D...|
12946+
00000070 11 ff 01 01 11 ff 00 00 00 00 00 00 00 00 00 00 |................|
12947+
12948+
Upper page 0h
12949+
00000080 18 4d 65 6c 6c 61 6e 6f 78 20 20 20 20 20 20 20 |.Mellanox |
12950+
00000090 20 00 02 c9 4d 43 50 31 36 36 30 2d 57 30 30 41 | ...MCP1660-W00A|
12951+
000000a0 45 33 30 20 41 32 4d 54 32 30 31 39 56 53 30 34 |E30 A2MT2019VS04|
12952+
000000b0 37 39 35 20 20 20 32 30 30 35 30 37 20 20 00 00 |795 200507 ..|
12953+
000000c0 00 00 00 00 00 00 00 00 00 01 05 23 04 05 07 15 |...........#....|
12954+
000000d0 00 00 00 02 0a 00 00 00 00 00 00 00 00 00 77 00 |..............w.|
12955+
000000e0 33 30 33 33 30 4b 34 33 34 31 30 44 00 00 00 00 |30330K43410D....|
12956+
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12957+
12958+
admin@sonic:~$ sfputil show eeprom-hexdump --port Ethernet0 --page 1
12959+
EEPROM hexdump for port Ethernet0 page 1h
12960+
Lower page 0h
12961+
00000000 11 08 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12962+
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12963+
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12964+
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12965+
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12966+
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12967+
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 01 08 00 |................|
12968+
00000070 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12969+
12970+
Upper page 1h
12971+
00000080 11 00 23 88 00 00 04 00 00 00 00 08 ff 00 00 00 |..#.............|
12972+
00000090 00 00 01 a0 4d 65 6c 6c 61 6e 6f 78 20 20 20 20 |....Mellanox |
12973+
000000a0 20 20 20 20 00 00 02 c9 4d 43 50 31 36 35 30 2d | ....MCP1650-|
12974+
000000b0 56 30 30 31 45 33 30 20 41 32 02 03 05 07 46 c5 |V001E30 A2....F.|
12975+
000000c0 40 00 00 00 4d 54 32 30 31 30 56 53 30 38 33 32 |@...MT2010VS0832|
12976+
000000d0 39 20 20 20 32 30 30 33 30 32 20 20 00 00 6a 84 |9 200302 ..j.|
12977+
000000e0 31 39 32 32 39 33 31 43 41 31 43 54 00 1e 00 00 |1922931CA1CT....|
12978+
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00 |.............0..|
12979+
12980+
admin@sonic:~$ sfputil show eeprom-hexdump
12981+
EEPROM hexdump for port Ethernet0
12982+
Lower page 0h
12983+
00000000 11 08 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12984+
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12985+
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12986+
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12987+
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12988+
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12989+
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 01 08 00 |................|
12990+
00000070 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
12991+
12992+
Upper page 0h
12993+
00000080 11 00 23 88 00 00 04 00 00 00 00 08 ff 00 00 00 |..#.............|
12994+
00000090 00 00 01 a0 4d 65 6c 6c 61 6e 6f 78 20 20 20 20 |....Mellanox |
12995+
000000a0 20 20 20 20 00 00 02 c9 4d 43 50 31 36 35 30 2d | ....MCP1650-|
12996+
000000b0 56 30 30 31 45 33 30 20 41 32 02 03 05 07 46 c5 |V001E30 A2....F.|
12997+
000000c0 40 00 00 00 4d 54 32 30 31 30 56 53 30 38 33 32 |@...MT2010VS0832|
12998+
000000d0 39 20 20 20 32 30 30 33 30 32 20 20 00 00 6a 84 |9 200302 ..j.|
12999+
000000e0 31 39 32 32 39 33 31 43 41 31 43 54 00 1e 00 00 |1922931CA1CT....|
13000+
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00 |.............0..|
13001+
13002+
EEPROM hexdump for port Ethernet8
13003+
Lower page 0h
13004+
00000000 18 30 80 03 00 00 00 00 00 00 00 00 00 00 00 00 |.0..............|
13005+
00000010 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 |................|
13006+
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
13007+
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
13008+
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
13009+
00000050 00 00 00 00 00 03 1d 01 88 01 1c 01 44 11 1b 01 |............D...|
13010+
00000060 22 55 1a 01 44 11 18 01 11 ff 17 01 44 11 16 01 |"U..D.......D...|
13011+
00000070 11 ff 01 01 11 ff 00 00 00 00 00 00 00 00 00 00 |................|
13012+
13013+
Upper page 0h
13014+
00000080 18 4d 65 6c 6c 61 6e 6f 78 20 20 20 20 20 20 20 |.Mellanox |
13015+
00000090 20 00 02 c9 4d 43 50 31 36 36 30 2d 57 30 30 41 | ...MCP1660-W00A|
13016+
000000a0 45 33 30 20 41 32 4d 54 32 30 31 39 56 53 30 34 |E30 A2MT2019VS04|
13017+
000000b0 37 39 35 20 20 20 32 30 30 35 30 37 20 20 00 00 |795 200507 ..|
13018+
000000c0 00 00 00 00 00 00 00 00 00 01 05 23 04 05 07 15 |...........#....|
13019+
000000d0 00 00 00 02 0a 00 00 00 00 00 00 00 00 00 77 00 |..............w.|
13020+
000000e0 33 30 33 33 30 4b 34 33 34 31 30 44 00 00 00 00 |30330K43410D....|
13021+
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
13022+
```
1291913023
1292013024
# SFP Utilities read command
1292113025

scripts/generate_dump

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,6 +1853,7 @@ main() {
18531853
save_cmd "show interface transceiver presence" "interface.xcvrs.presence" &
18541854
save_cmd "show interface transceiver eeprom --dom" "interface.xcvrs.eeprom" &
18551855
save_cmd "show ip interface -d all" "ip.interface" &
1856+
save_cmd "sfputil show eeprom-hexdump" "interface.xcvrs.eeprom.raw" &
18561857
wait
18571858

18581859
save_cmd "lldpctl" "lldpctl" &

0 commit comments

Comments
 (0)