- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
06-RMON Commands | 97.39 KB |
RMON configuration commands
display rmon alarm
Use display rmon alarm to display RMON alarm entries.
Syntax
display rmon alarm [ entry-number ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
entry-number: Specifies the index of an RMON alarm entry, in the range of 1 to 65535. If no entry is specified, the command displays all alarm entries.
|: 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.
Examples
# Display all RMON alarm entries.
AlarmEntry 1 owned by user1 is VALID.
Samples type : absolute
Variable formula : 1.3.6.1.2.1.16.1.1.1.4.1<etherStatsOctets.1>
Sampling interval : 10(sec)
Rising threshold : 50(linked with event 1)
Falling threshold : 5(linked with event 2)
When startup enables : risingOrFallingAlarm
Latest value : 0
Table 1 Command output
Field |
Description |
AlarmEntry entry-number owned by owner is status |
Status of the alarm entry entry-number created by the owner is status. · entry-number—Alarm entry, corresponding to the MIB node alarmIndex. · owner—Entry owner, corresponding to the MIB node alarmOwner. · status—Entry status, corresponding to the MIB node alarmStatus. ¡ VALID—The entry is valid. ¡ UNDERCREATION—The entry is invalid. The display rmon command can display invalid entries, but the display current-configuration and display this commands do not display their settings. |
Samples type |
Sampling type (the value can be absolute or delta), corresponding to the MIB node alarmSampleType. |
Variable formula |
Alarm variable (the monitored MIB node), corresponding to the MIB node alarmVariable. |
Sampling interval |
Sampling interval, in seconds, corresponding to the MIB node alarmInterval. |
Rising threshold |
Alarm rising threshold, corresponding to the MIB node alarmRisingThreshold. When the sampling value is greater than or equal to this threshold, a rising alarm is triggered. |
Falling threshold |
Alarm falling threshold, corresponding to the MIB node alarmFallingThreshold. When the sampling value is smaller than or equal to this threshold, a falling alarm is triggered. |
When startup enables |
How an alarm can be triggered, corresponding to the MIB node alarmStartupAlarm. |
Latest value |
Last sampled value, corresponding to the MIB node alarmValue. |
Related commands
rmon alarm
display rmon event
Use display rmon event to display the configuration of the specified or all RMON event entries.
Syntax
display rmon event [ entry-number ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
entry-number: Specifies the index of an RMON event entry, in the range of 1 to 65535. If no entry is specified, the command displays the configuration of all event entries.
|: 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.
Usage guidelines
An event entry includes the following information:
· Event index.
· Event owner.
· Event description.
· Action triggered by the event (such as logging the event or sending an SNMP notification).
· Last time when the event occurred (seconds that elapsed since the system startup).
Examples
# Display the RMON event table.
<Sysname> display rmon event
EventEntry 1 owned by user1 is VALID.
Description: null.
Will cause log-trap when triggered, last triggered at 0days 00h:02m:27s.
Table 2 Command output
Field |
Description |
EventEntry |
Event entry, corresponding to the MIB node eventIndex. |
owned by |
Event entry owner, corresponding to the MIB node eventOwner. |
VALID |
Entry status: · VALID—The entry is valid. · UNDERCREATION—The entry is invalid. The display rmon command can display invalid entries, but the display current-configuration and display this commands do not display their settings. Status value is stored in the MIB node eventStatus. |
Description |
Event description, corresponding to the MIB node eventDescription. |
cause log-trap when triggered |
Actions that the system takes when the event is triggered: · none—Takes no action. · log—Logs the event. · snmp-trap—Sends a trap to the NMS. · log-and-trap—Logs the event and sends a trap to the NMS. This field corresponds to the MIB node eventType. |
last triggered at |
Time when the last event was triggered, corresponding to the MIB node eventLastTimeSent. |
Related commands
rmon event
display rmon eventlog
Use display rmon eventlog to display log information for the specified event entry or all event entries.
Syntax
display rmon eventlog [ entry-number ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
entry-number: Specifies the index of an event entry, in the range of 1 to 65535.
|: 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.
Usage guidelines
If the entry-number argument is not specified, log information for all event entries is displayed.
If you use the rmon event command to configure the system to log an event when the event is triggered, the event is recorded in the RMON log. You can use this command to display details of the log table, which includes event index, current event state, time the event was logged (the elapsed time in seconds since system initialization/startup), and event description.
Examples
# Display the RMON log for event entry 1.
<Sysname> display rmon eventlog 1
LogEntry 1 owned by null is VALID.
Generates eventLog 1.1 at 0day(s) 00h:00m:33s.
Description: The alarm formula defined in prialarmEntry 1,
uprise 80 with alarm value 85. Alarm sample type is absolute.
Generates eventLog 1.2 at 0day(s) 00h:42m:03s.
Description: The alarm formula defined in prialarmEntry 2,
less than(or =) 5 with alarm value 0. Alarm sample type is delta.
Table 3 Command output
Field |
Description |
LogEntry |
Event entry, corresponding to the MIB node logIndex. |
owned by |
Event entry owner, corresponding to the MIB node eventOwner. |
VALID |
Entry status: · VALID—The entry is valid. · UNDERCREATION—The entry is invalid. The display rmon command can display invalid entries, but the display current-configuration and display this commands do not display their settings. Status value is stored in the MIB node eventStatus. |
Generates eventLog at |
Time when the log was created (time passed since the device was booted), corresponding to the MIB node logTime. |
Description |
Log description, corresponding to the MIB node logDescription. |
This example shows that event 1 generated two logs.
display rmon history
Use display rmon history to display RMON history control entry and history sampling information.
Syntax
display rmon history [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
|: 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.
Usage guidelines
After you have created history control entry on an interface, the system calculates information for the interface periodically and saves this information to the etherHistoryEntry table. You can use this command to display the entries in this table.
To configure the number of history sampling records that can be displayed and the history sampling interval, use the rmon history command.
Examples
# Display RMON history control entry and history sampling information for GigabitEthernet 1/0/1.
<Sysname> display rmon history gigabitethernet 1/0/1
HistoryControlEntry 1 owned by null is VALID
Samples interface : GigabitEthernet1/0/1<ifIndex.1>
Sampling interval : 10(sec) with 5 buckets max
Sampled values of record 1 :
dropevents : 0 , octets : 3166
packets : 43 , broadcast packets : 3
multicast packets : 6 , CRC alignment errors : 0
undersize packets : 0 , oversize packets : 0
fragments : 0 , jabbers : 0
collisions : 0 , utilization : 0
Sampled values of record 2 :
dropevents : 0 , octets : 834
packets : 8 , broadcast packets : 1
multicast packets : 6 , CRC alignment errors : 0
undersize packets : 0 , oversize packets : 0
fragments : 0 , jabbers : 0
collisions : 0 , utilization : 0
Sampled values of record 3 :
dropevents : 0 , octets : 1001
packets : 9 , broadcast packets : 1
multicast packets : 7 , CRC alignment errors : 0
undersize packets : 0 , oversize packets : 0
fragments : 0 , jabbers : 0
collisions : 0 , utilization : 0
Sampled values of record 4 :
dropevents : 0 , octets : 766
packets : 7 , broadcast packets : 0
multicast packets : 6 , CRC alignment errors : 0
undersize packets : 0 , oversize packets : 0
fragments : 0 , jabbers : 0
collisions : 0 , utilization : 0
Table 4 Command output
Field |
Description |
HistoryControlEntry |
History control entry, corresponding to MIB node etherHistoryIndex. |
owned by |
Entry owner, corresponding to MIB node historyControlOwner. |
VALID |
Entry status: · VALID—The entry is valid. · UNDERCREATION—The entry is invalid. The display rmon command can display invalid entries, but the display current-configuration and display this commands do not display their settings. Status value is stored in the MIB node historyControlStatus. |
Samples Interface |
Sampled interface. |
Sampling interval |
Sampling period, in seconds, which corresponds to MIB node historyControlInterval. The system periodically samples the information for an interface. |
buckets max |
Maximum number of history table entries that can be saved, corresponding to the MIB node historyControlBucketsGranted. If the specified value of the buckets argument exceeds the history table size supported by the device, the supported history table size is displayed. If the current number of the entries in the table has reached the maximum number, the system will delete the earliest entry to save the latest one. |
Sampled values of record number |
The (number)th statistics recorded in the system cache. Statistics records are numbered according to the order of time they are saved into the cache. |
dropevents |
Dropped packets during the sampling period, corresponding to the MIB node etherHistoryDropEvents. |
octets |
Number of octets received during the sampling period, corresponding to the MIB node etherHistoryOctets. |
packets |
Number of packets received during the sampling period, corresponding to the MIB node etherHistoryPkts. |
broadcastpackets |
Number of broadcasts received during the sampling period, corresponding to the MIB node etherHistoryBroadcastPkts. |
multicastpackets |
Number of multicasts received during the sampling period, corresponding to the MIB node etherHistoryMulticastPkts. |
CRC alignment errors |
Number of packets received with CRC alignment errors during the sampling period, corresponding to the MIB node etherHistoryCRCAlignErrors. |
undersize packets |
Number of undersize packets received during the sampling period, corresponding to the MIB node etherHistoryUndersizePkts. |
oversize packets |
Number of oversize packets received during the sampling period, corresponding to the MIB node etherHistoryOversizePkts. |
fragments |
Number of fragments received during the sampling period, corresponding to the MIB node etherHistoryFragments. |
jabbers |
Number of jabbers received during the sampling period, corresponding to the MIB node etherHistoryJabbers. |
collisions |
Number of colliding packets received during the sampling period, corresponding to the MIB node etherHistoryCollisions. |
utilization |
Bandwidth utilization during the sampling period, corresponding to the MIB node etherHistoryUtilization. |
Related commands
rmon history
display rmon prialarm
Use display rmon prialarm to display the configuration of the specified or all private alarm entries.
Syntax
display rmon prialarm [ entry-number ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
entry-number: Specifies a private alarm entry index in the range of 1 to 65535. If no entry is specified, the command displays the configuration of all private alarm entries.
|: 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.
Examples
# Display the configuration of all private alarm entries.
<Sysname> display rmon prialarm
PrialarmEntry 1 owned by user1 is VALID.
Samples type : absolute
Variable formula : (.1.3.6.1.2.1.16.1.1.1.6.1*100/.1.3.6.1.2.1.16.1.1.1.5.1)
Description : ifUtilization.GigabitEthernet1/0/1
Sampling interval : 10(sec)
Rising threshold : 80(linked with event 1)
Falling threshold : 5(linked with event 2)
When startup enables : risingOrFallingAlarm
This entry will exist : forever
Latest value : 85
Table 5 Command output
Field |
Description |
PrialarmEntry |
Private alarm table entry. |
owned by |
Entry owner (user1, in this example). |
VALID |
Entry status: · VALID—The entry is valid. · UNDERCREATION—The entry is invalid. The display rmon command can display invalid entries, but the display current-configuration and display this commands do not display their settings. |
Samples type |
Sampling type: absolute or delta. |
Description |
Description of the private alarm entry. |
Sampling interval |
Sampling interval, in seconds. The system performs absolute sample or delta sample to sampling variables according to the sampling interval. |
Rising threshold |
Alarm rising threshold. An event is triggered when the sampled value is greater than or equal to this threshold. |
Falling threshold |
Alarm falling threshold. An event is triggered when the sampled value is less than or equal to this threshold. |
linked with event |
Event index associated with the private alarm. |
When startup enables |
How can an alarm be triggered. |
This entry will exist |
Lifetime of the entry: forever or span the specified period. |
Latest value |
Count result of the last sample. |
Related commands
rmon prialarm
display rmon statistics
Use display rmon statistics to display RMON statistics.
Syntax
display rmon statistics [ interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface-type interface-number: Specifies an interface by its type and number.
|: 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.
Usage guidelines
This command displays the interface statistics during the period from the time the statistics entry is created to the time the command is executed. The statistics are cleared when the device reboots.
Examples
# Display RMON statistics for GigabitEthernet 1/0/1.
<Sysname> display rmon statistics gigabitethernet 1/0/1
EtherStatsEntry 1 owned by null is VALID.
Interface : GigabitEthernet1/0/1<ifIndex.3>
etherStatsOctets : 43393306 , etherStatsPkts : 619825
etherStatsBroadcastPkts : 503581 , etherStatsMulticastPkts : 44013
etherStatsUndersizePkts : 0 , etherStatsOversizePkts : 0
etherStatsFragments : 0 , etherStatsJabbers : 0
etherStatsCRCAlignErrors : 0 , etherStatsCollisions : 0
etherStatsDropEvents (insufficient resources): 0
Packets received according to length:
64 : 0 , 65-127 : 0 , 128-255 : 0
256-511: 0 , 512-1023: 0 , 1024-1518: 0
Table 6 Command output
Field |
Description |
EtherStatsEntry |
Entry of the statistics table, which corresponds to MIB node etherStatsIndex. |
VALID |
Entry status: · VALID—The entry is valid. · UNDERCREATION—The entry is invalid. The display rmon command can display invalid entries, but the display current-configuration and display this commands do not display their settings. Status value is stored in the MIB node etherStatsStatus. |
Interface |
Interface on which statistics are gathered, which corresponds to the MIB node etherStatsDataSource. |
etherStatsOctets |
Number of octets received by the interface during the statistical period, corresponding to the MIB node etherStatsOctets. |
etherStatsPkts |
Number of packets received by the interface during the statistical period, corresponding to the MIB node etherStatsPkts. |
etherStatsBroadcastPkts |
Number of broadcast packets received by the interface during the statistical period, corresponding to the MIB node etherStatsBroadcastPkts. |
etherStatsMulticastPkts |
Number of multicast packets received by the interface during the statistical period, corresponding to the MIB node etherStatsMulticastPkts. |
etherStatsUndersizePkts |
Number of undersize packets received by the interface during the statistical period, corresponding to the MIB node etherStatsUndersizePkts. |
etherStatsOversizePkts |
Number of oversize packets received by the interface during the statistical period, corresponding to the MIB node etherStatsOversizePkts. |
etherStatsFragments |
Number of undersize packets with CRC errors received by the interface during the statistical period, corresponding to the MIB node etherStatsFragments. |
etherStatsJabbers |
Number of oversize packets with CRC errors received by the interface during the statistical period, corresponding to the MIB node etherStatsJabbers. |
etherStatsCRCAlignErrors |
Number of packets with CRC errors received on the interface during the statistical period, corresponding to the MIB node etherStatsCRCAlignErrors. |
etherStatsCollisions |
Number of collisions received on the interface during the statistical period, corresponding to the MIB node etherStatsCollisions. |
etherStatsDropEvents |
Total number of drop events received on the interface during the statistical period, corresponding to the MIB node etherStatsDropEvents. |
Packets received according to length: |
Incoming-packet statistics by packet length for the statistical period: · 64—Number of 64-byte packets. The value is stored in the MIB node etherStatsPkts64Octets. · 65-127—Number of 65- to 127-byte packets. The value is stored in the MIB node etherStatsPkts65to127Octets. · 128-255—Number of 128- to 255-byte packets. to the value is stored in the MIB node etherStatsPkts128to255Octets. · 256-511—Number of 256- to 511-byte packets. The value is stored in the MIB node etherStatsPkts256to511Octets. · 512-1023—Number of 512- to 1023-byte packets. The value is stored in the MIB node etherStatsPkts512to1023Octets. · 1024-1518—Number of 1024- to 1518-byte packets. The value is stored in the MIB node etherStatsPkts1024to1518Octets. These statistics are hardware dependent. If hardware does not support them, 0 is displayed. |
Related commands
rmon statistics
rmon alarm
Use rmon alarm to create an entry in the RMON alarm table.
Use undo rmon alarm to remove an entry from the RMON alarm table.
Syntax
rmon alarm entry-number alarm-variable sampling-interval { absolute | delta } rising-threshold threshold-value1 event-entry1 falling-threshold threshold-value2 event-entry2 [ owner text ]
undo rmon alarm entry-number
Views
System view
Default command level
2: System level
Parameters
entry-number: Specifies the alarm entry index in the range of 1 to 65535.
alarm-variable: Specifies the alarm variable, a string of 1 to 256 characters. It can be in dotted object identifier (OID) format (in the format of entry.integer.instance or leaf node name.instance, for example, 1.3.6.1.2.1.2.1.10.1), or a node name like ifInOctets.1. Only variables that can be parsed into INTEGER (INTEGER, Counter, Gauge, or Time Ticks) in the ASN.1 can be used for the alarm-variable argument, such as the instance of the leaf node (like etherStatsOctets, etherStatsPkts, etherStatsBroadcastPkts, and so on) of the etherStatsEntry entry, the instance of the leaf node (like ifInOctets, ifInUcastPkts, ifInNUcastPkts, and so on) of the ifEntry entry.
sampling-interval: Sets the sampling interval in the range of 5 to 65535 seconds.
absolute: Sets the sampling type to absolute. The system obtains the value of the variable when the sampling time is reached.
delta: Sets the sampling type to delta. The system obtains the variation value of the variable during the sampling interval when the sampling time is reached.
rising-threshold threshold-value1 event-entry1: Sets the rising threshold, where the threshold-value1 argument represents the rising threshold, in the range of –2147483648 to +2147483647, and the event-entry1 argument represents the index of the event triggered when the rising threshold is reached. The value range for the event-entry1 argument is 0 to 65535. If 0 is specified, the alarm does not trigger any event.
falling-threshold threshold-value2 event-entry2: Sets the falling threshold, where the threshold-value2 argument represents the falling threshold, in the range of –2147483648 to +2147483647 and the event-entry2 argument represents the index of the event triggered when the falling threshold is reached. The value range for the event-entry2 argument is 1 to 65535. If 0 is specified, the alarm does not trigger any event.
owner text: Specifies the entry owner, a case-sensitive string of 1 to 127 characters that can contain spaces.
Usage guidelines
You can create a maximum of 60 alarm entries.
To make sure an alarm entry can take effect:
· Before creating an alarm entry, use the rmon event command to define the events to be referenced. Otherwise, the alarm entry cannot trigger events, even if it can be created.
· If the alarm variable is an instance of the leaf node of the Ethernet statistics table etherStatsEntry with the OID of 1.3.6.1.2.1.16.1.1.1, use the rmon statistics command to create a statistics entry on the monitored Ethernet interface. If the alarm variable is an instance of the leaf node of the history record table etherHistoryEntry with the OID of 1.3.6.1.2.1.16.2.2.1, use the rmon history command to create a history entry on the monitored Ethernet interface. Otherwise, the alarm entry cannot trigger events, even if it can be created.
· Make sure the alarm entry has different alarm variable (alarm-variable), sampling interval (sampling-interval), sampling type (absolute or delta), rising threshold (threshold-value1) and falling threshold (threshold-value2) than any existing alarm entry in the system.
When the alarm condition in an alarm entry occurs, its associated event is triggered to handle the alarm.
The system regularly samples the monitored alarm variables, compares the sampled values with the predefined thresholds, and does the following:
· If the rising threshold is reached, triggers the event specified by the event-entry1 argument.
· If the falling threshold is reached, triggers the event specified by the event-entry2 argument.
Examples
# Add entry 1 in the alarm table and sample the node 1.3.6.1.2.1.16.1.1.1.4.1 at a sampling interval of 10 seconds in absolute sampling type. Trigger event 1 when the sampled value is greater than or equal to the rising threshold of 5000, and event 2 when the sampled value is less than or equal to the falling threshold of 5. Set the owner of the entry to be user1.
<Sysname> system-view
[Sysname] rmon event 1 log
[Sysname] rmon event 2 none
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] rmon statistics 1
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] rmon alarm 1 1.3.6.1.2.1.16.1.1.1.4.1 10 absolute rising-threshold 5000 1 falling-threshold 5 2 owner user1
1.3.6.1.2.1.16.1.1.1.4 is the OID of the leaf node etherStatsOctets. It represents the incoming packet statistics in bytes for interfaces. In this example, you can use etherStatsOctets.1 to replace the parameter 1.3.6.1.2.1.16.1.1.1.4.1, where 1 indicates the serial number of the interface statistics entry. If you execute the rmon statistics 5 command, you can use etherStatsOctets.5 to replace the parameter.
This example enables the RMON agent to do the following:
· Samples and monitors GigabitEthernet 1/0/1.
· Obtains the incoming-packet count in its absolute value. If the total number of incoming bytes reaches 5000, the system logs the event. If the total number of incoming bytes is no more than 5, the system takes no action.
Related commands
· display rmon alarm
· rmon event
· rmon history
· rmon statistics
rmon event
Use rmon event to create an entry in the RMON event table.
Use undo rmon event to remove an entry from the RMON event table.
Syntax
rmon event entry-number [ description string ] { log | log-trap log-trapcommunity | none | trap trap-community } [ owner text ]
undo rmon event entry-number
Views
System view
Default command level
2: System level
Parameters
entry-number: Specifies an event entry index in the range of 1 to 65535.
description string: Configures an event description, a string of 1 to 127 characters.
log: Logs the event when it occurs.
log-trap log-trapcommunity: Log and trap events. The system performs both logging and trap sending when the event occurs. The log-trapcommunity argument indicates the community name of the network management station that receives trap messages, a string of 1 to 127 characters.
none: Performs no action when the event occurs.
trap trap-community: Trap event. The system sends a trap with a community name when the event occurs. The trap-community argument specifies the community name of the network management station that receives trap messages, a string of 1 to 127 characters.
owner text: Specifies the entry owner, a case-sensitive string of 1 to 127 characters that can contain spaces.
Usage guidelines
When creating an event entry, you can define the actions that the system takes when the event is triggered by its associated alarm in the alarm table. Depending on your configuration, the system logs the event, sends an SNMP notification, does both, or does neither.
You cannot create an entry that has the same event description, event type (log, trap, logtrap or none), and community name (trap-community or log-trapcommunity) as an existing event entry in the RMON event table.
You can create a maximum of 60 alarm entries.
Examples
# Create event 10 in the RMON event table.
<Sysname> system-view
[Sysname] rmon event 10 log owner user1
Related commands
· display rmon event
· rmon alarm
· rmon prialarm
rmon history
Use rmon history to create an entry in the RMON history control table.
Use undo rmon history to remove a specified entry from the RMON history control table.
Syntax
rmon history entry-number buckets number interval sampling-interval [ owner text ]
undo rmon history entry-number
Views
Ethernet interface view
Default command level
2: System level
Parameters
entry-number: Specifies a history control entry index in the range of 1 to 65535.
buckets number: Specifies the history table size for the entry, in the range of 1 to 65535. The default is 10.
interval sampling-interval: Specifies the sampling period in the range of 5 to 3600 seconds.
owner text: Specifies the entry owner, a case-sensitive string of 1 to 127 characters that can contain spaces.
Usage guidelines
After an entry is created, the system periodically samples the number of packets received/sent on the interface, and saves the statistics as an instance under the leaf node of the etherHistoryEntry table. The maximum number of statistics records that can be saved for the entry is specified by buckets number. If the maximum number of the statistics records for the entry has been reached, the system deletes the earliest record for the latest one. The statistics include total number of received packets on the interface, total number of broadcast packets, and total number of multicast packets in a sampling period.
You can successfully create a history control entry, even if the specified bucket size exceeds the history table size supported by the device. However, the effective bucket size will be the actual value supported by the device. To view the configuration result, use the display rmon history command.
You can configure multiple history control entries for one interface. Make sure their entry numbers and sampling intervals are different.
The device supports a maximum of 100 history control entries.
Examples
# Create RMON history control entry 1 for GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] rmon history 1 buckets 10 interval 5 owner user1
Related commands
display rmon history
rmon prialarm
Use rmon prialarm to create an entry in the private alarm table of RMON.
Use undo rmon prialarm to remove a private alarm entry from the private alarm table of RMON.
Syntax
rmon prialarm entry-number prialarm-formula prialarm-des sampling-interval { absolute | changeratio | delta } rising-threshold threshold-value1 event-entry1 falling-threshold threshold-value2 event-entry2 entrytype { forever | cycle cycle-period } [ owner text ]
undo rmon prialarm entry-number
Views
System view
Default command level
2: System level
Parameters
entry-number: Specifies the index of a private alarm entry, in the range of 1 to 65535.
prialarm-formula: Configures a private alarm variable formula, a string of 1 to 256 characters. The variables in the formula must be represented in OID format that starts with a dot (.), such as the formula (.1.3.6.1.2.1.2.1.10.1)*8, for example. You can customize the formula and perform the basic operations of addition, subtraction, multiplication, and division on these variables. The operations should yield a long integer. To prevent errors, make sure the result of each calculating step falls into the value range for long integers.
prialarm-des: Private alarm entry description, a string of 1 to 127 characters.
sampling-interval: Sets the sampling interval in the range of 10 to 65535 seconds.
absolute | changeratio | delta: Sets the sampling type to absolute, delta, or change ratio. Absolute sampling is to obtain the value of the variable when the sampling time is reached. Delta sampling is to obtain the variation value of the variable during the sampling interval when the sampling time is reached. Change ratio sampling is not supported at present.
rising-threshold threshold-value1 event-entry1: Sets the rising threshold, where the threshold-value1 argument represents the rising threshold in the range of –2147483648 to +2147483647, and the event-entry1 argument represents the index of the event triggered when the rising threshold is reached. The value range for the event-entry1 argument is 0 to 65535, where 0 means no corresponding event is triggered and no event action is taken when an alarm is triggered.
falling-threshold threshold-value2 event-entry2: Sets the falling threshold, where the threshold-value2 argument represents the falling threshold in the range of –2147483648 to +2147483647 and the event-entry2 argument represents the index of the event triggered when the falling threshold is reached. The value range for the event-entry2 argument is 1 to 65535.
forever: Indicates that the lifetime of the private alarm entry is infinite.
cycle cycle-period: Sets the lifetime period of the private alarm entry, in the range of 0 to 2147483647 seconds.
owner text: Specifies the entry owner, a case-sensitive string of 1 to 127 characters that can contain spaces.
Usage guidelines
Before creating an alarm entry, use the rmon event command to define the events to be referenced in the event table.
You cannot create an entry that has the same alarm variable formula (prialarm-formula), sampling type (absolute changeratio or delta), rising threshold (threshold-value1), and falling threshold (threshold-value2) as an existing private alarm entry.
You can create a maximum of 50 private alarm entries.
The system handles private alarm entries as follows:
1. Samples the private alarm variables in the private alarm formula at the specified sampling interval.
2. Performs calculation on the sampled values with the formula.
3. Compares the calculation result with the predefined thresholds and does the following:
¡ If the result is equal to or greater than the rising threshold, triggers the event specified by the event-entry1 argument.
¡ If the result is equal to or smaller than the falling threshold, triggers the event specified by the event-entry2 argument.
Examples
# Monitor the ratio of the broadcast packets received on the interface by using the private alarm.
Calculate the private alarm variables with the (1.3.6.1.2.1.16.1.1.1.6.1*100/.1.3.6.1.2.1.16.1.1.1.5.1) formula and sample the corresponding variables at 10-second intervals. (Broadcast packet ratio= total number of broadcast packets received on the interface/total number of packets received on the interface. The formula is user configurable.)
The rising threshold (80%) triggers event 1 to log the event. The falling threshold (5%) triggers event 2, but the event defines neither log nor trap action.
Set the lifetime of the entry to forever and owner to user1.
<Sysname> system-view
[Sysname] rmon event 1 log
[Sysname] rmon event 2 none
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] rmon statistics 1
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] rmon prialarm 1 (.1.3.6.1.2.1.16.1.1.1.6.1*100/.1.3.6.1.2.1.16.1.1.1.5.1) BroadcastPktsRatioOfGE1/0/1 10 absolute rising-threshold 80 1 falling-threshold 5 2 entrytype forever owner user1
1.3.6.1.2.1.16.1.1.1.6.1 is the OID of the node etherStatsBroadcastPkts.1, and 1.3.6.1.2.1.16.1.1.1.5.1 is the OID of the node etherStatsPkts.1. 1 indicates the serial number of the interface statistics entry. Therefore, if you execute the rmon statistics 5 command, you should use 1.3.6.1.2.1.16.1.1.1.6.5 and 1.3.6.1.2.1.16.1.1.1.5.5.
This example enables the RMON agent to do the following:
· Samples and monitors GigabitEthernet 1/0/1.
· If the portion of incoming broadcast packets in the total traffic crosses 80%, the system logs the event. If the portion is less than or equal to 5%, the system takes no action. To view the event log, use the display rmon eventlog command.
Related commands
· display rmon prialarm
· rmon event
· rmon history
· rmon statistics
rmon statistics
Use rmon statistics to create an entry in the RMON statistics table.
Use undo rmon statistics to remove an entry from the RMON statistics table.
Syntax
rmon statistics entry-number [ owner text ]
undo rmon statistics entry-number
Views
Ethernet interface view
Default command level
2: System level
Parameters
entry-number: Specifies the index of statistics entry, in the range of 1 to 65535.
owner text: Specifies the entry owner, a string of case-sensitive 1 to 127 characters that can contain spaces.
Usage guidelines
You can create one statistics entry for each Ethernet interface, and a maximum of 100 statistics entries on the device.
Each RMON statistics table entry provides a set of cumulative traffic statistics collected up to the present time for an interface. Statistics include number of collisions, CRC alignment errors, number of undersize or oversize packets, number of broadcasts, number of multicasts, number of bytes received, and number of packets received. The statistics are cleared at a reboot.
To display the RMON statistics table, use the display rmon statistics command.
Examples
# Create an RMON statistics entry for GigabitEthernet 1/0/1. The index is 20 and the owner is user1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] rmon statistics 20 owner user1