Skip to content

[portstat] show BPS, PPS, UTIL rates w/o previous clear#508

Merged
jleveque merged 1 commit intosonic-net:masterfrom
mykolaf:stats
Apr 15, 2019
Merged

[portstat] show BPS, PPS, UTIL rates w/o previous clear#508
jleveque merged 1 commit intosonic-net:masterfrom
mykolaf:stats

Conversation

@mykolaf
Copy link
Collaborator

@mykolaf mykolaf commented Apr 11, 2019

Signed-off-by: Mykola Faryma [email protected]

- What I did
Handled sonic-net/sonic-buildimage#2738
Show the BPS, PPS rates even if the counters were not cleared yet.
Both for show interface counters and show interface counters rif
- How I did it
If no counters cache available, calculate the rates over the switch uptime.
- How to verify it

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

admin@sonic:~$ show int counters
     IFACE    STATE    RX_OK    RX_BPS    RX_PPS    RX_UTIL    RX_ERR    RX_DRP    RX_OVR    TX_OK    TX_BPS    Tx_PPS    TX_UTIL    TX_ERR
----------  -------  -------  --------  --------  ---------  --------  --------  --------  -------  --------  --------  ---------  --------
 Ethernet0        X          0       N/A       N/A        N/A        0        0       N/A        0       N/A       N/A        N/A         0
 Ethernet1        U          0       N/A       N/A        N/A        0        0       N/A       69       N/A       N/A        N/A         0

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

admin@sonic:~ $ show int counters
     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
 Ethernet1        U        0    0.00 B/s      0.00%         0         0       N/A       69    7.75 B/s      0.00%         0         0       N/A

-->

@mykolaf mykolaf marked this pull request as ready for review April 11, 2019 15:52
@jleveque jleveque merged commit 148d455 into sonic-net:master Apr 15, 2019
mykolaf pushed a commit to mykolaf/sonic-utilities that referenced this pull request Nov 1, 2019
lguohan pushed a commit that referenced this pull request Nov 5, 2019
* Revert "show BPS, PPS, UTIL rates w/o previous clear (#508)"

This reverts commit 148d455.

* [portstat] use actual port speed for util calculation after revert

Signed-off-by: Mykola Faryma <[email protected]>
@mykolaf mykolaf deleted the stats branch February 18, 2020 13:17
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