Skip to content

Added VDM monitoring for transceiver diagnostics#4636

Open
nkanchi-nexthop wants to merge 3 commits into
sonic-net:masterfrom
nexthop-ai:nkanchi.VDM-monitoring
Open

Added VDM monitoring for transceiver diagnostics#4636
nkanchi-nexthop wants to merge 3 commits into
sonic-net:masterfrom
nexthop-ai:nkanchi.VDM-monitoring

Conversation

@nkanchi-nexthop

@nkanchi-nexthop nkanchi-nexthop commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What I did

Add VDM (Versatile Diagnostics Monitoring) support so transceiver diagnostics can display real-time optical health metrics along with thresholds and violation flags. Added features can be seen in section 4.2 here: CMIS Diagnostic Monitoring Overview in SONiC.

How I did it

  • Added sfpshow vdm to show current VDM values and thresholds.
  • Added sfpshow vdm-flag to show threshold violation flags, with --detail for change count and set/clear timestamps.
  • Implemented VDM table builders for values, flags, and detailed flag history.
  • Added support for up to 8 lanes and integrated the commands under show interfaces transceiver vdm.
  • Read VDM values, thresholds, and flags from the corresponding TRANSCEIVER_VDM_* STATE_DB tables.

How to verify it

  • Run sfpshow vdm to display VDM values for all ports.
  • Run sfpshow vdm -p Ethernet0 to verify output for a specific port (Select a port that VDM data is applicable for).
  • Run sfpshow vdm-flag to check threshold violation flags.
  • Run sfpshow vdm-flag --detail to verify change count and set/clear timestamps.
  • Run show interfaces transceiver vdm, show interfaces transceiver vdm flag, and show interfaces transceiver vdm flag --detail to confirm the equivalent show command paths work.
  • Confirm the output includes current values, thresholds, and flag status per observable and lane, with additional timestamp details in --detail mode.

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

N/A

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

root@humm212:/home/admin# show interfaces transceiver vdm Ethernet68
Current System Time: Tue Jun 30 22:30:39 2026
Update interval: 60 seconds
Last updated: Tue Jun 30 22:30:15 2026

Ethernet68:
    Parameter                   Lane    Current    Min        Avg        Max        Threshold    Threshold    Threshold    Threshold
                                        Value                                       High         High         Low          Low
                                                                                    Alarm        Warning      Warning      Alarm
    --------------------------  ------  ---------  ---------  ---------  ---------  -----------  -----------  -----------  -----------
    CD Long                     1       0.0        --         --         --         655340.0     655340.0     -655360.0    -655360.0
    Errored Frames Media Input  1       0.0        0.0        0.0        0.0        1000.0       1.0          0.0          0.0
    Errored Frames Host Input   1       0.0        0.0        0.0        0.0        1000.0       1.0          0.0          0.0
    Errored Frames Host Input   2       0.0        0.0        0.0        0.0        1000.0       1.0          0.0          0.0
    Errored Frames Host Input   3       0.0        0.0        0.0        0.0        1000.0       1.0          0.0          0.0
    Errored Frames Host Input   4       0.0        0.0        0.0        0.0        1000.0       1.0          0.0          0.0
    Laser Temperature           1       37.855     --         --         --         80.0         75.0         0.0          -5.0
    Modulator Bias XI           1       43.07      --         --         --         99.001       95.0         5.0          0.999
    Modulator Bias XP           1       68.47      --         --         --         99.001       95.0         5.0          0.999
    Modulator Bias XQ           1       86.528     --         --         --         99.001       95.0         5.0          0.999
    Modulator Bias YI           1       27.196     --         --         --         99.001       95.0         5.0          0.999
    Modulator Bias YP           1       71.89      --         --         --         99.001       95.0         5.0          0.999
    Modulator Bias YQ           1       48.949     --         --         --         99.001       95.0         5.0          0.999
    Pre-FEC BER Media Input     1       1.320E-04  9.430E-05  1.350E-04  1.590E-04  1.250E-02    1.100E-02    0.0          0.0
    Pre-FEC BER Host Input      1       0.0        0.0        0.0        2.650E-11  1.000E-05    1.000E-06    0.0          0.0
    Pre-FEC BER Host Input      2       1.000E+00  1.000E+00  1.000E+00  1.000E+00  1.000E-05    1.000E-06    0.0          0.0
    Pre-FEC BER Host Input      3       1.000E+00  1.000E+00  1.000E+00  1.000E+00  1.000E-05    1.000E-06    0.0          0.0
    Pre-FEC BER Host Input      4       1.000E+00  1.000E+00  1.000E+00  1.000E+00  1.000E-05    1.000E-06    0.0          0.0


root@humm212:/home/admin# show interfaces transceiver vdm flag Ethernet68
Current System Time: Tue Jun 30 22:31:01 2026
Update interval: 60 seconds
Last updated: Tue Jun 30 22:30:45 2026

Ethernet68:
    Parameter                   Lane    High Alarm    High Warning    Low Warning    Low Alarm
                                        Flag          Flag            Flag           Flag
    --------------------------  ------  ------------  --------------  -------------  -----------
    CD Long                     1       False         False           False          False
    Errored Frames Media Input  1       False         False           False          False
    Errored Frames Host Input   1       False         False           False          False
    Errored Frames Host Input   2       False         False           False          False
    Errored Frames Host Input   3       False         False           False          False
    Errored Frames Host Input   4       False         False           False          False
    Laser Temperature           1       False         False           False          False
    Modulator Bias XI           1       False         False           False          False
    Modulator Bias XP           1       False         False           False          False
    Modulator Bias XQ           1       False         False           False          False
    Modulator Bias YI           1       False         False           False          False
    Modulator Bias YP           1       False         False           False          False
    Modulator Bias YQ           1       False         False           False          False
    Pre-FEC BER Media Input     1       False         False           False          False
    Pre-FEC BER Host Input      1       False         False           False          False
    Pre-FEC BER Host Input      2       False         False           False          False
    Pre-FEC BER Host Input      3       False         False           False          False
    Pre-FEC BER Host Input      4       False         False           False          False


root@humm212:/home/admin# show interfaces transceiver vdm flag --detail Ethernet68
Current System Time: Tue Jun 30 22:31:28 2026
Update interval: 60 seconds
Last updated: Tue Jun 30 22:31:15 2026

Ethernet68:
    Parameter       Lane    Detail        High Alarm       High Warning     Low Alarm    Low Warning
    --------------  ------  ------------  ---------------  ---------------  -----------  -------------
    CD Long         1       Flag          False            False            False        False
                            Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

    Errored Frames  1       Flag          False            False            False        False
    Media Input             Change Count  2                2                0            0
                            Last Set      6 days, 4 hours  6 days, 4 hours  never        never
                            Last Clear    6 days, 4 hours  6 days, 4 hours  never        never

    Errored Frames  1       Flag          False            False            False        False
    Host Input              Change Count  2                2                0            0
                            Last Set      6 days, 4 hours  6 days, 4 hours  never        never
                            Last Clear    6 days, 4 hours  6 days, 4 hours  never        never

    Errored Frames  2       Flag          False            False            False        False
    Host Input              Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

    Errored Frames  3       Flag          False            False            False        False
    Host Input              Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

    Errored Frames  4       Flag          False            False            False        False
    Host Input              Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

    Laser           1       Flag          False            False            False        False
    Temperature             Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

    Modulator Bias  1       Flag          False            False            False        False
    XI                      Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

    Modulator Bias  1       Flag          False            False            False        False
    XP                      Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

    Modulator Bias  1       Flag          False            False            False        False
    XQ                      Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

    Modulator Bias  1       Flag          False            False            False        False
    YI                      Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

    Modulator Bias  1       Flag          False            False            False        False
    YP                      Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

    Modulator Bias  1       Flag          False            False            False        False
    YQ                      Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

    Pre-FEC BER     1       Flag          False            False            False        False
    Media Input             Change Count  2                2                0            0
                            Last Set      6 days, 4 hours  6 days, 4 hours  never        never
                            Last Clear    6 days, 4 hours  6 days, 4 hours  never        never

    Pre-FEC BER     1       Flag          False            False            False        False
    Host Input              Change Count  2                2                0            0
                            Last Set      6 days, 4 hours  6 days, 4 hours  never        never
                            Last Clear    6 days, 4 hours  6 days, 4 hours  never        never

    Pre-FEC BER     2       Flag          False            False            False        False
    Host Input              Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

    Pre-FEC BER     3       Flag          False            False            False        False
    Host Input              Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

    Pre-FEC BER     4       Flag          False            False            False        False
    Host Input              Change Count  0                0                0            0
                            Last Set      never            never            never        never
                            Last Clear    never            never            never        never

Signed-off-by: nkanchi-nexthop <nkanchi@nexthop.ai>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@nkanchi-nexthop nkanchi-nexthop marked this pull request as ready for review June 26, 2026 17:09
@nkanchi-nexthop nkanchi-nexthop marked this pull request as draft June 26, 2026 17:10
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Nikhil Kanchi <nkanchi@nexthop.ai>
@nkanchi-nexthop nkanchi-nexthop force-pushed the nkanchi.VDM-monitoring branch from 71e8975 to 3c17f8f Compare July 10, 2026 20:19
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@nkanchi-nexthop nkanchi-nexthop marked this pull request as ready for review July 10, 2026 21:24
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