- Table of Contents
-
- 12-Network Management and Monitoring Command Reference
- 00-Preface
- 01-System Maintenance and Debugging Commands
- 02-NQA Commands
- 03-NTP Commands
- 04-Clock Monitoring Commands
- 05-IPC Commands
- 06-SNMP Commands
- 07-RMON Commands
- 08-Sampler Commands
- 09-Mirroring Commands
- 10-NetStream Commands
- 11-IPv6 NetStream Commands
- 12-Protocol Packet Statistics Commands
- 13-Information Center Commands
- 14-Flow Logging Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
08-Sampler Commands | 72.18 KB |
|
NOTE: In this documentation, SPC cards refer to the cards prefixed with SPC, for example, SPC-GT48L. SPE cards refer to the cards prefixed with SPE, for example, SPE-1020-E-II. |
display sampler
Syntax
display sampler [ sampler-name ] [ slot slot-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
sampler-name: Specifies the sampler name, a case-insensitive string of 1 to 32 characters.
slot slot-number: Displays the sampler configuration and running information of the specified card.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display sampler command to view configuration and running information about a sampler.
Examples
# Display the configuration and running information of the specified sampler.
<Sysname> display sampler 256
Sampler name: 256
Index: 1, Mode: Fixed, Packet-interval: 8
Packet counter: 0, Random number: 1
Total packet number (processed/selected): 256/1
Table 1 Output description
Field |
Description |
Sampler name |
Name of the sampler. |
Index |
Index number identifying a sampler. |
Mode |
Sampling mode, which can be fixed mode or random mode. SPC cards support only the fixed mode. |
Packet-interval |
Sampling rate. |
Packet counter |
Numbers sampled packets. |
Random number |
The number of the sampled packet: · In fixed mode, the first packet in each group is sampled, and this field is fixed at 1. · In random mode, this field indicates the “n”th packet in each group is sampled. |
Total packet number (processed/selected) |
Number of packets out of which a packet is sampled/Number of packets selected by the sampler. |
sampler
Syntax
sampler sampler-name mode { fixed | random } packet-interval rate
undo sampler sampler-name
View
System view
Default level
2: System level
Parameters
sampler-name: Assigns the name to the sampler, a case-insensitive string of 1 to 32 characters.
fixed: Specifies the fixed sampling mode, in which the first packet is selected per sampling.
random: Specifies the random sampling mode, in which any packet might be selected per sampling. SPC cards support only the fixed mode.
packet-interval rate: Specifies the sampling rate, which equals the 2 to the power of rate.
Description
Use the sampler command to create or modify a sampler. Up to 8 samplers can be created.
Use the undo sampler command to delete a sampler.
Examples
# Create a sampler with the name abc in fixed sampling mode. Set the sampling rate to 8, which means one packet out of 256 packets (2 to the power of 8) is sampled.
<Sysname> system-view
[Sysname] sampler abc mode fixed packet-interval 8