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

[202012] [portstat, intfstat] added rates and utilization #1812

Merged
merged 2 commits into from
Sep 13, 2021

Conversation

vadymhlushko-mlnx
Copy link
Contributor

What I did

Backport the pull/1750 to 202012 branch

Depends on sonic-swss-common/pull/330

According to HLD added calculation of rates and utilization columns to the portstat and intfstat scripts output

How I did it

Modified the portstat and intfstat scripts

How to verify it

Added UT

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

admin@sonic:~$ show int count
      IFACE    STATE    RX_OK    RX_BPS    RX_UTIL    RX_ERR    RX_DRP    RX_OVR    TX_OK    TX_BPS    TX_UTIL    TX_ERR    TX_DRP    TX_OVR
-----------  -------  -------  --------  ---------  --------  --------  --------  -------  --------  ---------  --------  --------  --------
  Ethernet0        X        0       N/A        N/A         0         0       N/A        0       N/A        N/A         0         0       N/A
  Ethernet2        U      287       N/A        N/A         0         0       N/A      818       N/A        N/A         0         0       N/A
  Ethernet4        U      380       N/A        N/A         0         0       N/A      858       N/A        N/A         0         0       N/A
  Ethernet6        U      286       N/A        N/A         0         0       N/A      850       N/A        N/A         0         0       N/A

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

admin@sonic:~$ show int count
      IFACE    STATE    RX_OK      RX_BPS    RX_UTIL    RX_ERR    RX_DRP    RX_OVR    TX_OK      TX_BPS    TX_UTIL    TX_ERR    TX_DRP    TX_OVR
-----------  -------  -------  ----------  ---------  --------  --------  --------  -------  ----------  ---------  --------  --------  --------
  Ethernet0        X        0    0.00 B/s      0.00%         0         0       N/A        0    0.00 B/s      0.00%         0         0       N/A
  Ethernet2        U        0    0.00 B/s      0.00%         0         0       N/A        0    0.00 B/s      0.00%         0         0       N/A
  Ethernet4        U        0    0.00 B/s      0.00%         0         0       N/A        0    0.00 B/s      0.00%         0         0       N/A
  Ethernet6        U        0    0.00 B/s      0.00%         0         0       N/A        0    0.00 B/s      0.00%         0         0       N/A

@vadymhlushko-mlnx vadymhlushko-mlnx changed the title [portstat, intfstat] added rates and utilization [202012] [portstat, intfstat] added rates and utilization Sep 10, 2021
@lgtm-com
Copy link

lgtm-com bot commented Sep 10, 2021

This pull request introduces 1 alert when merging c67b00b into a9c6970 - view on LGTM.com

new alerts:

  • 1 for Unused import

@liat-grozovik
Copy link
Collaborator

@qiluo-msft could you please help to approve and merge?

@qiluo-msft qiluo-msft requested a review from ganglyu September 13, 2021 07:42
@qiluo-msft qiluo-msft merged commit d03ba4f into sonic-net:202012 Sep 13, 2021
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 18, 2022
* d03ba4f [202012] [portstat, intfstat] added rates and utilization  (sonic-net#1812)
* 499ad3f [config reload] Fix config reload failure due to sonic.target job cancellation (sonic-net#1814)
* 96d658c [202012][sonic installer] Add swap setup support (sonic-net#1815)
* a9c6970 platform pre-check for reboot in 202012 branch (sonic-net#1788)
* 0e0478b Unify the number format in the ourput of portstat and pfcstat in all cases (sonic-net#1795)
* 2d1e00e [ecnconfig] Fix exception seen during display and add unit tests (sonic-net#1784) (sonic-net#1789)

Signed-off-by: Volodymyr Samotiy <[email protected]>
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