Skip to content

Commit d3bc688

Browse files
CLI addition for PFC counters --history (#3778)
* Add history option to pfcstat cli * Unit tests for pfcstat history cli Please note the usage of `# flake8: noqa: E501` in assert_show_output.py to account for the length of show command output strings. * Add pfc counters history flag to utilities documentation
1 parent 3282ab3 commit d3bc688

File tree

8 files changed

+827
-43
lines changed

8 files changed

+827
-43
lines changed

doc/Command-Reference.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9702,8 +9702,38 @@ This command displays the details of Rx & Tx priority-flow-control (pfc) for all
97029702
...
97039703
```
97049704

9705+
The history flag can be used to view historical statistics:
97059706

9706-
- NOTE: PFC counters can be cleared by the user with the following command:
9707+
* Usage: see [PFC Watchdog Commands](#pfc-watchdog-commands) on enabling history estimation
9708+
```
9709+
show pfc counters --history
9710+
```
9711+
9712+
* Example:
9713+
```
9714+
Port Priority RX Pause Transitions Total RX Pause Time US Recent RX Pause Time US Recent RX Pause Timestamp
9715+
--------- ---------- ---------------------- ------------------------ ------------------------- ---------------------------
9716+
Ethernet0 PFC0 12 12,000 1,200 01/10/2008, 21:20:00
9717+
Ethernet0 PFC1 21 20,001 2,001 05/18/2033, 03:33:20
9718+
Ethernet0 PFC2 22 20,002 2,002 05/18/2033, 03:33:20
9719+
Ethernet0 PFC3 23 20,003 2,003 05/18/2033, 03:33:20
9720+
Ethernet0 PFC4 24 20,004 2,004 05/18/2033, 03:33:20
9721+
Ethernet0 PFC5 25 20,005 2,005 05/18/2033, 03:33:20
9722+
Ethernet0 PFC6 26 20,006 2,006 05/18/2033, 03:33:20
9723+
Ethernet0 PFC7 27 20,007 2,007 05/18/2033, 03:33:20
9724+
9725+
Ethernet4 PFC0 14 14,000 1,400 05/13/2014, 16:53:20
9726+
Ethernet4 PFC1 41 40,001 4,001 10/02/2096, 07:06:40
9727+
Ethernet4 PFC2 42 40,002 4,002 10/02/2096, 07:06:40
9728+
Ethernet4 PFC3 43 40,003 4,003 10/02/2096, 07:06:40
9729+
Ethernet4 PFC4 44 40,004 4,004 10/02/2096, 07:06:40
9730+
Ethernet4 PFC5 45 40,005 4,005 10/02/2096, 07:06:40
9731+
Ethernet4 PFC6 46 40,006 4,006 10/02/2096, 07:06:40
9732+
Ethernet4 PFC7 47 40,007 4,007 10/02/2096, 07:06:40
9733+
```
9734+
9735+
9736+
- NOTE: PFC counters (including historical stats) can be cleared by the user with the following command:
97079737
```
97089738
admin@sonic:~$ sonic-clear pfccounters
97099739
```

0 commit comments

Comments
 (0)