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

Added 'detailed' option for 'show interface counters' command #1299

Merged
merged 5 commits into from
Dec 13, 2020

Conversation

AkhileshSamineni
Copy link
Contributor

@AkhileshSamineni AkhileshSamineni commented Dec 10, 2020

The current ‘show interfaces counters’ command does not show any information regarding the BCAST/MCAST counters per interface. Also, no data regarding the different packet sizes Rx/Tx counts.

Depends on sonic-net/sonic-swss#1536

Added a detailed option for 'show interface counters' to display all these information.
This is a per interface command like show below

root@sonic:/home/admin# show interfaces counters detailed -h
Usage: show interfaces counters detailed [OPTIONS] <interface_name>

Show interface counters detailed

Options:
-p, --period TEXT Display statistics over a specified period (in seconds)
--verbose Enable verbose output
-?, -h, --help Show this message and exit.
root@sonic:/home/admin#

Sample Output:
root@sonic:/home/admin# show interfaces counters detailed Ethernet11
Packets Received 64 Octets..................... 77
Packets Received 65-127 Octets................. 6
Packets Received 128-255 Octets................ 0
Packets Received 256-511 Octets................ 3
Packets Received 512-1023 Octets............... 0
Packets Received 1024-1518 Octets.............. 0
Packets Received 1519-2047 Octets.............. 0
Packets Received 2048-4095 Octets.............. 0
Packets Received 4096-9216 Octets.............. 0
Packets Received 9217-16383 Octets............. 0

Total Packets Received Without Errors.......... 86
Unicast Packets Received....................... 79
Multicast Packets Received..................... 6
Broadcast Packets Received..................... 1

Jabbers Received............................... 0
Fragments Received............................. 0
Undersize Received............................. 0
Overruns Received.............................. 0

Packets Transmitted 64 Octets.................. 77
Packets Transmitted 65-127 Octets.............. 0
Packets Transmitted 128-255 Octets............. 0
Packets Transmitted 256-511 Octets............. 3,677
Packets Transmitted 512-1023 Octets............ 0
Packets Transmitted 1024-1518 Octets........... 0
Packets Transmitted 1519-2047 Octets........... 0
Packets Transmitted 2048-4095 Octets........... 0
Packets Transmitted 4096-9216 Octets........... 0
Packets Transmitted 9217-16383 Octets.......... 0

Total Packets Transmitted Successfully......... 3,754
Unicast Packets Transmitted.................... 80
Multicast Packets Transmitted.................. 3,674
Broadcast Packets Transmitted.................. 0
Time Since Counters Last Cleared............... None
root@sonic:/home/admin#

Signed-off-by: Akhilesh Samineni akhilesh.samineni@broadcom.com

Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
@lgtm-com
Copy link

lgtm-com bot commented Dec 10, 2020

This pull request introduces 1 alert when merging 8ecf7c8 into 57a0b41 - view on LGTM.com

new alerts:

  • 1 for Syntax error

Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
@AkhileshSamineni
Copy link
Contributor Author

Retest this please.

1 similar comment
@AkhileshSamineni
Copy link
Contributor Author

Retest this please.

Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
@AkhileshSamineni
Copy link
Contributor Author

Retest this please.

lguohan pushed a commit to sonic-net/sonic-swss that referenced this pull request Dec 13, 2020
…1536)

Added Statistics support for Tx and Rx counters of different frames sizes.

Depends on sonic-net/sonic-utilities#1299

Added below stats
SAI_PORT_STAT_ETHER_IN_PKTS_64_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_65_TO_127_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_256_TO_511_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_512_TO_1023_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_1024_TO_1518_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_1519_TO_2047_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_2048_TO_4095_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_4096_TO_9216_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_9217_TO_16383_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_64_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_65_TO_127_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_128_TO_255_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_256_TO_511_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_512_TO_1023_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_1024_TO_1518_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_1519_TO_2047_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_2048_TO_4095_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_4096_TO_9216_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_9217_TO_16383_OCTETS
SAI_PORT_STAT_ETHER_STATS_JABBERS
SAI_PORT_STAT_ETHER_STATS_FRAGMENTS
SAI_PORT_STAT_ETHER_STATS_UNDERSIZE_PKTS
SAI_PORT_STAT_IP_IN_RECEIVES

Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
@lguohan lguohan merged commit 10ffc28 into sonic-net:master Dec 13, 2020
arlakshm pushed a commit to arlakshm/sonic-swss that referenced this pull request Dec 15, 2020
…onic-net#1536)

Added Statistics support for Tx and Rx counters of different frames sizes.

Depends on sonic-net/sonic-utilities#1299

Added below stats
SAI_PORT_STAT_ETHER_IN_PKTS_64_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_65_TO_127_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_256_TO_511_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_512_TO_1023_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_1024_TO_1518_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_1519_TO_2047_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_2048_TO_4095_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_4096_TO_9216_OCTETS
SAI_PORT_STAT_ETHER_IN_PKTS_9217_TO_16383_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_64_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_65_TO_127_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_128_TO_255_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_256_TO_511_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_512_TO_1023_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_1024_TO_1518_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_1519_TO_2047_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_2048_TO_4095_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_4096_TO_9216_OCTETS
SAI_PORT_STAT_ETHER_OUT_PKTS_9217_TO_16383_OCTETS
SAI_PORT_STAT_ETHER_STATS_JABBERS
SAI_PORT_STAT_ETHER_STATS_FRAGMENTS
SAI_PORT_STAT_ETHER_STATS_UNDERSIZE_PKTS
SAI_PORT_STAT_IP_IN_RECEIVES

Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
anand-kumar-subramanian pushed a commit to anand-kumar-subramanian/sonic-utilities that referenced this pull request Mar 2, 2021
…net#1299)

The current ‘show interfaces counters’ command does not show any information regarding the BCAST/MCAST counters per interface. Also, no data regarding the different packet sizes Rx/Tx counts.

Depends on sonic-net/sonic-swss#1536

Added a detailed option for 'show interface counters' to display all these information.
This is a per interface command like show below

root@sonic:/home/admin# show interfaces counters detailed -h
Usage: show interfaces counters detailed [OPTIONS] <interface_name>

Show interface counters detailed

Options:
-p, --period TEXT Display statistics over a specified period (in seconds)
--verbose Enable verbose output
-?, -h, --help Show this message and exit.
root@sonic:/home/admin#

Sample Output:
root@sonic:/home/admin# show interfaces counters detailed Ethernet11
Packets Received 64 Octets..................... 77
Packets Received 65-127 Octets................. 6
Packets Received 128-255 Octets................ 0
Packets Received 256-511 Octets................ 3
Packets Received 512-1023 Octets............... 0
Packets Received 1024-1518 Octets.............. 0
Packets Received 1519-2047 Octets.............. 0
Packets Received 2048-4095 Octets.............. 0
Packets Received 4096-9216 Octets.............. 0
Packets Received 9217-16383 Octets............. 0

Total Packets Received Without Errors.......... 86
Unicast Packets Received....................... 79
Multicast Packets Received..................... 6
Broadcast Packets Received..................... 1

Jabbers Received............................... 0
Fragments Received............................. 0
Undersize Received............................. 0
Overruns Received.............................. 0

Packets Transmitted 64 Octets.................. 77
Packets Transmitted 65-127 Octets.............. 0
Packets Transmitted 128-255 Octets............. 0
Packets Transmitted 256-511 Octets............. 3,677
Packets Transmitted 512-1023 Octets............ 0
Packets Transmitted 1024-1518 Octets........... 0
Packets Transmitted 1519-2047 Octets........... 0
Packets Transmitted 2048-4095 Octets........... 0
Packets Transmitted 4096-9216 Octets........... 0
Packets Transmitted 9217-16383 Octets.......... 0

Total Packets Transmitted Successfully......... 3,754
Unicast Packets Transmitted.................... 80
Multicast Packets Transmitted.................. 3,674
Broadcast Packets Transmitted.................. 0
Time Since Counters Last Cleared............... None
root@sonic:/home/admin#


Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
 [aclorch] Add support for creating ingress and egress MIRROR tables
 concurrently (sonic-net#1286)
[proxy_arp] Implement proxy ARP feature (sonic-net#1302)
Fix LAG member test case (sonic-net#1304)
[orchagent] Set default MTU for the underlay loopback interface (sonic-net#1299)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants