Skip to content

Commit b550c44

Browse files
Add command reference for trap flow counters (sonic-net#1876)
*Update CLI command reference for trap flow counters
1 parent 67a267b commit b550c44

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

doc/Command-Reference.md

+55
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
* [Feature](#feature)
5454
* [Feature show commands](#feature-show-commands)
5555
* [Feature config commands](#feature-config-commands)
56+
* [Flow Counters](#flow-counters)
57+
* [Flow Counters show commands](#flow-counters-show-commands)
58+
* [Flow Counters clear commands](#flow-counters-clear-commands)
5659
* [Gearbox](#gearbox)
5760
* [Gearbox show commands](#gearbox-show-commands)
5861
* [Interfaces](#interfaces)
@@ -3066,6 +3069,58 @@ commands are don't care and will not update state/auto-restart value.
30663069
30673070
Go Back To [Beginning of the document](#) or [Beginning of this section](#feature)
30683071
3072+
## Flow Counters
3073+
3074+
This section explains all the Flow Counters show commands and clear commands that are supported in SONiC. Flow counters are usually used for debugging, troubleshooting and performance enhancement processes. Flow counters supports case like:
3075+
3076+
- Host interface traps (number of received traps per Trap ID)
3077+
3078+
### Flow Counters show commands
3079+
3080+
**show flowcnt-trap stats**
3081+
3082+
This command is used to show the current statistics for the registered host interface traps.
3083+
3084+
Because clear (see below) is handled on a per-user basis different users may see different counts.
3085+
3086+
- Usage:
3087+
```
3088+
show flowcnt-trap stats
3089+
```
3090+
3091+
- Example:
3092+
```
3093+
admin@sonic:~$ show flowcnt-trap stats
3094+
Trap Name Packets Bytes PPS
3095+
--------- --------- ------- -------
3096+
dhcp 100 2,000 50.25/s
3097+
3098+
For multi-ASIC:
3099+
admin@sonic:~$ show flowcnt-trap stats
3100+
ASIC ID Trap Name Packets Bytes PPS
3101+
------- ----------- --------- ------- -------
3102+
asic0 dhcp 100 2,000 50.25/s
3103+
asic1 dhcp 200 3,000 45.25/s
3104+
```
3105+
3106+
### Flow Counters clear commands
3107+
3108+
**sonic-clear flowcnt-trap**
3109+
3110+
This command is used to clear the current statistics for the registered host interface traps. This is done on a per-user basis.
3111+
3112+
- Usage:
3113+
```
3114+
sonic-clear flowcnt-trap
3115+
```
3116+
3117+
- Example:
3118+
```
3119+
admin@sonic:~$ sonic-clear flowcnt-trap
3120+
Trap Flow Counters were successfully cleared
3121+
```
3122+
3123+
Go Back To [Beginning of the document](#) or [Beginning of this section](#flow-counters)
30693124
## Gearbox
30703125
30713126
This section explains all the Gearbox PHY show commands that are supported in SONiC.

0 commit comments

Comments
 (0)