Skip to content

Add timestamps to gearbox FEC histogram#4577

Draft
nkanchi-nexthop wants to merge 1 commit into
sonic-net:masterfrom
nexthop-ai:nkanchi.last-updated-timestamps
Draft

Add timestamps to gearbox FEC histogram#4577
nkanchi-nexthop wants to merge 1 commit into
sonic-net:masterfrom
nexthop-ai:nkanchi.last-updated-timestamps

Conversation

@nkanchi-nexthop
Copy link
Copy Markdown

What I did

The gearbox FEC histogram counters (S0–S15) are polled periodically by FlexCounter, but users have no way to know when a given bin value last changed. Adding per-bin timestamps lets the operator determine the freshness of each gearbox FEC codeword error bucket.

How I did it

Changed the gearbox interface display to read from counter entries.

How to verify it

  • Configure FlexCounter to poll gearbox FEC histogram stats on a gearbox port.
  • Verify the gearbox counter entries for the port include the FEC histogram counters and corresponding _TIMESTAMP fields.
  • Run gearboxutil interfaces fec-histogram Ethernet0 and confirm both the Line and System tables show a Last Updated column.
  • Confirm timestamps are only updated when the corresponding counter value changes, not on every poll cycle.

Previous command output (if the output of a command-line utility has changed)

root@humm119:/home/admin# gearboxutil interfaces fec-histogram Ethernet0

Ethernet0 Line
Symbol Errors Per Codeword         Codewords
----------------------------  --------------
BIN0                          13544912011756
BIN1                                       0
BIN2                                       0
BIN3                                       0
BIN4                                       0
BIN5                                       0
BIN6                                       0
BIN7                                       0
BIN8                                       0
BIN9                                       0
BIN10                                      0
BIN11                                      0
BIN12                                      0
BIN13                                      0
BIN14                                      0
BIN15                                      0

Ethernet0 System
Symbol Errors Per Codeword         Codewords
----------------------------  --------------
BIN0                          13549184048038
BIN1                                       0
BIN2                                       0
BIN3                                       0
BIN4                                       0
BIN5                                       0
BIN6                                       0
BIN7                                       0
BIN8                                       0
BIN9                                       0
BIN10                                      0
BIN11                                      0
BIN12                                      0
BIN13                                      0
BIN14                                      0
BIN15                                      0

New command output (if the output of a command-line utility has changed)

root@humm119:/home/admin# gearboxutil interfaces fec-histogram Ethernet0

Ethernet0 Line
Symbol Errors Per Codeword         Codewords  Last Updated
----------------------------  --------------  -------------------
BIN0                          13544912011756  2026-05-27 21:33:49
BIN1                                       0  2026-05-21 16:05:52
BIN2                                       0  2026-05-21 16:05:52
BIN3                                       0  2026-05-21 16:05:52
BIN4                                       0  2026-05-21 16:05:52
BIN5                                       0  2026-05-21 16:05:52
BIN6                                       0  2026-05-21 16:05:52
BIN7                                       0  2026-05-21 16:05:52
BIN8                                       0  2026-05-21 16:05:52
BIN9                                       0  2026-05-21 16:05:52
BIN10                                      0  2026-05-21 16:05:52
BIN11                                      0  2026-05-21 16:05:52
BIN12                                      0  2026-05-21 16:05:52
BIN13                                      0  2026-05-21 16:05:52
BIN14                                      0  2026-05-21 16:05:52
BIN15                                      0  2026-05-21 16:05:52

Ethernet0 System
Symbol Errors Per Codeword         Codewords  Last Updated
----------------------------  --------------  -------------------
BIN0                          13549184048038  2026-05-27 21:33:49
BIN1                                       0  2026-05-21 16:05:52
BIN2                                       0  2026-05-21 16:05:52
BIN3                                       0  2026-05-21 16:05:52
BIN4                                       0  2026-05-21 16:05:52
BIN5                                       0  2026-05-21 16:05:52
BIN6                                       0  2026-05-21 16:05:52
BIN7                                       0  2026-05-21 16:05:52
BIN8                                       0  2026-05-21 16:05:52
BIN9                                       0  2026-05-21 16:05:52
BIN10                                      0  2026-05-21 16:05:52
BIN11                                      0  2026-05-21 16:05:52
BIN12                                      0  2026-05-21 16:05:52
BIN13                                      0  2026-05-21 16:05:52
BIN14                                      0  2026-05-21 16:05:52
BIN15                                      0  2026-05-21 16:05:52

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 29, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: nkanchi-nexthop / name: Nikhil Kanchi (68d1af5)

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants