Skip to content

Collect module EEPROM data in dump #3009

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

Merged
merged 16 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 105 additions & 1 deletion doc/Command-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
* [MACsec show command](#macsec-show-command)
* [MACsec clear command](#macsec-clear-command)
* [SFP Utilities Commands](#sfp-utilities-commands)
* [SFP Utilities show commands](#sfp-utilities-show-commands)
* [SFP Utilities read command](#sfp-utilities-read-command)
* [SFP Utilities write command](#sfp-utilities-write-command)
* [Static DNS Commands](#static-dns-commands)
Expand Down Expand Up @@ -12914,8 +12915,111 @@ Clear MACsec counters which is to reset all MACsec counters to ZERO.
Go Back To [Beginning of the document](#) or [Beginning of this section](#macsec-commands)

# SFP Utilities Commands
This sub-section explains the list of commands available for SFP utilities feature.

This sub-section explains the list of commands available for SFP utilities feature.
## SFP Utilities show commands

- Show SFP EEPROM hex dump

```
admin@sonic:~$ sfputil show eeprom-hexdump --help
Usage: sfputil show eeprom-hexdump [OPTIONS]
Display EEPROM hexdump of SFP transceiver(s)
Options:
-p, --port <port_name> Display SFP EEPROM hexdump for port <port_name>
-n, --page <page_number> Display SFP EEEPROM hexdump for
<page_number_in_hex>
--help Show this message and exit.
```

```
admin@sonic:~$ sfputil show eeprom-hexdump --port Ethernet0 --page 0
EEPROM hexdump for port Ethernet0 page 0h
Lower page 0h
00000000 18 30 80 03 00 00 00 00 00 00 00 00 00 00 00 00 |.0..............|
00000010 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 |................|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000050 00 00 00 00 00 03 1d 01 88 01 1c 01 44 11 1b 01 |............D...|
00000060 22 55 1a 01 44 11 18 01 11 ff 17 01 44 11 16 01 |"U..D.......D...|
00000070 11 ff 01 01 11 ff 00 00 00 00 00 00 00 00 00 00 |................|

Upper page 0h
00000080 18 4d 65 6c 6c 61 6e 6f 78 20 20 20 20 20 20 20 |.Mellanox |
00000090 20 00 02 c9 4d 43 50 31 36 36 30 2d 57 30 30 41 | ...MCP1660-W00A|
000000a0 45 33 30 20 41 32 4d 54 32 30 31 39 56 53 30 34 |E30 A2MT2019VS04|
000000b0 37 39 35 20 20 20 32 30 30 35 30 37 20 20 00 00 |795 200507 ..|
000000c0 00 00 00 00 00 00 00 00 00 01 05 23 04 05 07 15 |...........#....|
000000d0 00 00 00 02 0a 00 00 00 00 00 00 00 00 00 77 00 |..............w.|
000000e0 33 30 33 33 30 4b 34 33 34 31 30 44 00 00 00 00 |30330K43410D....|
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

admin@sonic:~$ sfputil show eeprom-hexdump --port Ethernet0 --page 1
EEPROM hexdump for port Ethernet0 page 1h
Lower page 0h
00000000 11 08 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 01 08 00 |................|
00000070 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

Upper page 1h
00000080 11 00 23 88 00 00 04 00 00 00 00 08 ff 00 00 00 |..#.............|
00000090 00 00 01 a0 4d 65 6c 6c 61 6e 6f 78 20 20 20 20 |....Mellanox |
000000a0 20 20 20 20 00 00 02 c9 4d 43 50 31 36 35 30 2d | ....MCP1650-|
000000b0 56 30 30 31 45 33 30 20 41 32 02 03 05 07 46 c5 |V001E30 A2....F.|
000000c0 40 00 00 00 4d 54 32 30 31 30 56 53 30 38 33 32 |@...MT2010VS0832|
000000d0 39 20 20 20 32 30 30 33 30 32 20 20 00 00 6a 84 |9 200302 ..j.|
000000e0 31 39 32 32 39 33 31 43 41 31 43 54 00 1e 00 00 |1922931CA1CT....|
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00 |.............0..|

admin@sonic:~$ sfputil show eeprom-hexdump
EEPROM hexdump for port Ethernet0
Lower page 0h
00000000 11 08 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 01 08 00 |................|
00000070 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

Upper page 0h
00000080 11 00 23 88 00 00 04 00 00 00 00 08 ff 00 00 00 |..#.............|
00000090 00 00 01 a0 4d 65 6c 6c 61 6e 6f 78 20 20 20 20 |....Mellanox |
000000a0 20 20 20 20 00 00 02 c9 4d 43 50 31 36 35 30 2d | ....MCP1650-|
000000b0 56 30 30 31 45 33 30 20 41 32 02 03 05 07 46 c5 |V001E30 A2....F.|
000000c0 40 00 00 00 4d 54 32 30 31 30 56 53 30 38 33 32 |@...MT2010VS0832|
000000d0 39 20 20 20 32 30 30 33 30 32 20 20 00 00 6a 84 |9 200302 ..j.|
000000e0 31 39 32 32 39 33 31 43 41 31 43 54 00 1e 00 00 |1922931CA1CT....|
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00 |.............0..|

EEPROM hexdump for port Ethernet8
Lower page 0h
00000000 18 30 80 03 00 00 00 00 00 00 00 00 00 00 00 00 |.0..............|
00000010 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 |................|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000050 00 00 00 00 00 03 1d 01 88 01 1c 01 44 11 1b 01 |............D...|
00000060 22 55 1a 01 44 11 18 01 11 ff 17 01 44 11 16 01 |"U..D.......D...|
00000070 11 ff 01 01 11 ff 00 00 00 00 00 00 00 00 00 00 |................|

Upper page 0h
00000080 18 4d 65 6c 6c 61 6e 6f 78 20 20 20 20 20 20 20 |.Mellanox |
00000090 20 00 02 c9 4d 43 50 31 36 36 30 2d 57 30 30 41 | ...MCP1660-W00A|
000000a0 45 33 30 20 41 32 4d 54 32 30 31 39 56 53 30 34 |E30 A2MT2019VS04|
000000b0 37 39 35 20 20 20 32 30 30 35 30 37 20 20 00 00 |795 200507 ..|
000000c0 00 00 00 00 00 00 00 00 00 01 05 23 04 05 07 15 |...........#....|
000000d0 00 00 00 02 0a 00 00 00 00 00 00 00 00 00 77 00 |..............w.|
000000e0 33 30 33 33 30 4b 34 33 34 31 30 44 00 00 00 00 |30330K43410D....|
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
```

# SFP Utilities read command

Expand Down
1 change: 1 addition & 0 deletions scripts/generate_dump
Original file line number Diff line number Diff line change
Expand Up @@ -1853,6 +1853,7 @@ main() {
save_cmd "show interface transceiver presence" "interface.xcvrs.presence" &
save_cmd "show interface transceiver eeprom --dom" "interface.xcvrs.eeprom" &
save_cmd "show ip interface -d all" "ip.interface" &
save_cmd "sfputil show eeprom-hexdump" "interface.xcvrs.eeprom.raw" &
wait

save_cmd "lldpctl" "lldpctl" &
Expand Down
Loading