Skip to content
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

VxLAN Tunnel Counters and Rates implementation #1748

Merged
merged 16 commits into from
Oct 29, 2021

Conversation

dgsudharsan
Copy link
Collaborator

@dgsudharsan dgsudharsan commented Aug 7, 2021

What I did

Implemented Vxlan counters and rates. Defined show commands for counters and rates similar to port and tunnel rates.

How I did it

Implemented tunnelstat utility and used it in show vxlan counters command.

How to verify it

Using unit tests in CLI

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

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

show vxlan counters
    IFACE    RX_PKTS    RX_BYTES    RX_PPS    TX_PKTS    TX_BYTES    TX_PPS
---------  ---------  ----------  --------  ---------  ----------  --------
vtep_1336      2,359         N/A    0.99/s    205,972         N/A   86.93/s

show vxlan counters  vtep_1336
vtep_1336
---------

        RX:
                13 packets
               N/A bytes
        TX:
             1,164 packets
               N/A bytes

@lgtm-com
Copy link

lgtm-com bot commented Aug 7, 2021

This pull request introduces 4 alerts when merging 19fff55 into 30907c4 - view on LGTM.com

new alerts:

  • 2 for Unused import
  • 1 for Variable defined multiple times
  • 1 for Clear-text logging of sensitive information

@lgtm-com
Copy link

lgtm-com bot commented Aug 7, 2021

This pull request introduces 1 alert when merging 7a12c0f0cfb62d20d1aa94f7dd19fc3fdaa1b5c8 into 30907c4 - view on LGTM.com

new alerts:

  • 1 for Unused import

@dgsudharsan
Copy link
Collaborator Author

This pull request introduces 1 alert when merging 7a12c0f into 30907c4 - view on LGTM.com

new alerts:

  • 1 for Unused import

This lgtm is for using mock table dbconnector and its by the existing design. We should ignore this lgtm.

@lgtm-com
Copy link

lgtm-com bot commented Oct 16, 2021

This pull request introduces 3 alerts when merging d5f82f3e6a34f06e506ad049a62629acca46500c into d8ee5e9 - view on LGTM.com

new alerts:

  • 2 for Variable defined multiple times
  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Oct 16, 2021

This pull request introduces 1 alert when merging 2f93cb11d267ffceb27a7b9a2d516599f90dad5d into d8ee5e9 - view on LGTM.com

new alerts:

  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Oct 16, 2021

This pull request introduces 1 alert when merging c97e1597b609a27c683fe00f40a28e86546cd37a into d8ee5e9 - view on LGTM.com

new alerts:

  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Oct 21, 2021

This pull request introduces 1 alert when merging 165546bce5a0180a24c86dc9977d46561bd486e5 into 9017d99 - view on LGTM.com

new alerts:

  • 1 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Oct 22, 2021

This pull request introduces 2 alerts when merging 91c96c4 into 9017d99 - view on LGTM.com

new alerts:

  • 2 for Unused import

nstat_fields = ("rx_b_ok", "rx_p_ok", "tx_b_ok", "tx_p_ok")
NStats = namedtuple("NStats", nstat_fields)

header = ['IFACE', 'RX_OK', 'RX_BYTES', 'RX_PPS','TX_OK', 'TX_BYTES', 'TX_PPS']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be better to change TX_OK to TX_PKT as we are using bytes for the other column ? Same for RX_OK and RX_PKT

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

srj102
srj102 previously approved these changes Oct 22, 2021
@lgtm-com
Copy link

lgtm-com bot commented Oct 22, 2021

This pull request introduces 2 alerts when merging 5d0c058 into 9017d99 - view on LGTM.com

new alerts:

  • 2 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Oct 22, 2021

This pull request introduces 1 alert when merging fe622b2 into 9017d99 - view on LGTM.com

new alerts:

  • 1 for Unused import

@dgsudharsan
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lgtm-com
Copy link

lgtm-com bot commented Oct 22, 2021

This pull request introduces 1 alert when merging 81df07d into 9017d99 - view on LGTM.com

new alerts:

  • 1 for Unused import

@dgsudharsan
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dgsudharsan
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dgsudharsan
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lgtm-com
Copy link

lgtm-com bot commented Oct 25, 2021

This pull request introduces 1 alert when merging 45d9a47 into 8ea834b - view on LGTM.com

new alerts:

  • 1 for Unused import

@dgsudharsan
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dgsudharsan
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -0,0 +1,342 @@
#!/usr/bin/env python3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the CLI command reference guide.

@prsunny prsunny merged commit 0665d6f into sonic-net:master Oct 29, 2021
dgsudharsan added a commit to dgsudharsan/sonic-utilities that referenced this pull request Jun 30, 2022
dgsudharsan added a commit to dgsudharsan/sonic-utilities that referenced this pull request Aug 26, 2022
prsunny pushed a commit that referenced this pull request Sep 9, 2022
* VxLAN Tunnel Counters and Rates implementation (#1748)
@dgsudharsan dgsudharsan deleted the evpn_vlan_tun_cntrs branch March 9, 2023 02:06
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.

4 participants