Configure RMON History Sampling
The Junos OS supports the history control group
(etherHistoryTable
) of the Remote
Network Monitoring (RMON) MIB (RFC 2819). The history
control tables record statistical samples from an Ethernet network
and store them for later retrieval.
To configure RMON history sampling and view or clear collected statistics using the Junos OS CLI, perform the following tasks:
Configure RMON History Sampling Collection
Use the history
statement at the [edit snmp rmon]
hierarchy level to configure RMON history sampling collection parameters.
The following parameters are required:
History index: The history entry is identified by an integer history index value (
historyControlIndex
MIB field) specified when you configure this statement, which is used to display or clear collected results later.Interface: The interface to monitor for the specified history index. Only one interface can be associated with a particular RMON history index.
In addition to the required parameters, you can specify a custom
sampling interval
(in seconds) and the sampling bucket-size
(number of discrete samples to be collected in a given interval).
[edit snmp] user@switch# set rmon history history-index interface interface-name user@switch# set rmon history history-index interval seconds user@switch# set rmon history history-index bucket-size number
An optional tag (owner
) associated with the history
index can also be assigned to the collection.
View and Clear RMON History Statistics
Use the show snmp rmon history
command to display collected RMON history table entries. You
can also use the show snmp mib walk
command to view RMON history table field samples.
The following sample RMON configuration sets up a history table sampling for interface xe-0/0/20.0 using a history index value of 1:
user@switch# show snmp | display set set snmp rmon history 1 interface xe-0/0/20.0 set snmp rmon history 1 bucket-size 1000 set snmp rmon history 1 interval 5 set snmp rmon history 1 owner test
Using the show snmp mib walk
command, you can see etherHistoryPkts
field statistics collected for history
index 1:
user@switch> show snmp mib walk etherHistoryPkts etherHistoryPkts.1.1 = 0 <...> etherHistoryPkts.1.148 = 10 etherHistoryPkts.1.149 = 14
To clear collected RMON history statistics, use the clear snmp history
command. After
clearing samples collected up to that point, collection continues
again at the configured interval, and new samples are recorded. This
command has options to clear collected samples of a particular configured
history index or to clear all samples from all configured indices.
For example, the following command clears collected RMON history samples for history control index 1 configured above:
user@switch> clear snmp history 1 Samples collected are cleared. user@switch> show snmp mib walk etherHistoryPkts | no-more user@switch> show snmp mib walk etherHistoryPkts | no-more etherHistoryPkts.1.1 = 0