Sampler commands -- display sampler

Use display sampler to display configuration information for a sampler.

Syntax

Centralized devices:

display sampler [ sampler-name ]

Distributed devices in standalone mode:Centralized IRF devices:

display sampler [ sampler-name ] [ slot slot-number [ cpu cpu-number ] ]

Distributed devices in IRF mode:

display sampler [ sampler-name ] [ chassis chassis-number slot slot-number [ cpu cpu-number ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

sampler-name: Specifies a sampler by its name, a case-insensitive string of 1 to 31 characters. If you do not specify a sampler, this command displays configuration information for all samplers.

slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays sampler configuration information for the active MPU. (Distributed devices in standalone mode.)

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays sampler configuration information for the master device. (Centralized IRF devices.) (IRF 3 incapable.)

slot slot-number: Specifies an IRF 2 member device by its member ID or specifies a PEX by its virtual slot number. If you do not specify a member device or PEX, this command displays sampler configuration information for the master device. (Centralized IRF devices.) (IRF 3 capable.)

chassis chassis-number slot slot-number: Specifies a card on an IRF member device. The chassis-number argument represents the member ID of the IRF member device. The slot-number argument represents the slot number of the card. If you do not specify a card, this command displays sampler configuration information for the global active MPU. (Distributed devices in IRF mode.) (IRF 3 incapable.)

chassis chassis-number slot slot-number: Specifies a card on an IRF 2 member device or specifies a PEX. The chassis-number argument represents the member ID of the IRF 2 member device or the virtual chassis number of the PEX. The slot-number argument represents the slot number of the card or PEX. If you do not specify a card or PEX, this command displays sampler configuration information for the global active MPU. (Distributed devices in IRF mode.) (IRF 3 capable.)

cpu cpu-number: Specifies a CPU by its number.

Examples

# Display the configuration information about sampler 256.

<Sysname> display sampler 256

Sampler name: 256

Mode: Fixed; Packet-interval: 8; IsNpower: Y

Table 1 Command output

Field | Description
Sampler name | Name of the sampler.
Mode | Sampling mode, including fixed mode and random mode.
Packet-interval | Sampling rate.
IsNpower | Whether the sampling rate is 2 to the nth power: · Y—Yes. · N—No.

‌

Sampler commands -- sampler

Use sampler to create a sampler.

Use undo sampler to delete a sampler.

Syntax

sampler sampler-name mode { fixed | random } packet-interval [ n-power ] rate

undo sampler sampler-name

Default

No samplers exist.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

sampler-name: Specifies a sampler by its name, a case-insensitive string of 1 to 31 characters.

fixed: Specifies the fixed sampling mode. A sampler in this mode selects the first packet per sampling.

random: Specifies the random sampling mode. A sampler in this mode randomly selects a packet out of a group of packets. Which packet is selected for each sampling varies.

n-power: Specifies the sampling rate as 2 to the n th power.

rate: Specifies the sampling rate. If the n-power keyword is not specified, one packet is selected from rate packets in each sampling. If the n-power keyword is specified, one packet is selected from 2 to the rate th power packets in each sampling. For example, if n-power 8 is specified, one packet is selected from 256 (2 to the 8th power) packets in each sampling.

Usage guidelines

The total number of samplers varies by device model.

(Distributed devices in standalone mode.)(Distributed devices in IRF mode.) This command takes effect on all cards.

Examples

# Create sampler abc in fixed sampling mode. Set the sampling rate to 8 to select one packet form 8 packets in each sampling.

<Sysname> system-view

[Sysname] sampler abc mode fixed packet-interval 8