|
|
Table Of Contents
Restrictions for CPU Thresholding Notification
Information About CPU Thresholding Notification
How to Configure CPU Thresholding Notification
Enabling CPU Thresholding Notification
Defining CPU Thresholding Notification
Setting the Entry Limit and Size of CPU Utilization Statistics
Configuration Examples for CPU Thresholding Notification
Setting a Rising CPU Thresholding Notification: Example
Setting a Falling CPU Thresholding Notification: Example
process cpu statistics limit entry-percentage
CPU Thresholding Notification
The CPU Thresholding Notification feature notifies users when a predefined threshold of CPU usage is crossed by generating a Simple Network Management Protocol (SNMP) trap message for the top users of the CPU.
Feature History for the CPU Thresholding Notification Feature
Finding Support Information for Platforms and Cisco IOS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
Contents
•
Restrictions for CPU Thresholding Notification
•
Information About CPU Thresholding Notification
•
How to Configure CPU Thresholding Notification
•
Configuration Examples for CPU Thresholding Notification
Restrictions for CPU Thresholding Notification
CPU utilization averages are computed by Cisco IOS software using a 4-millisecond Network-to-Management Interface (NMI) tick. In the unlikely event where the traffic rate is a multiple of this tick rate over a prolonged period of time, the CPU Thresholding Notification feature may not accurately measure the CPU load.
Information About CPU Thresholding Notification
The CPU Thresholding Notification feature allows you to configure CPU utilization thresholds that, when crossed, trigger a notification. Two types of CPU utilization threshold are supported:
Rising Threshold
A rising CPU utilization threshold specifies the percentage of CPU resources that, when exceeded for a configured period of time, triggers a CPU threshold notification.
Falling Threshold
A falling CPU utilization threshold specifies the percentage of CPU resources that, when CPU usage falls below this level for a configured period of time, triggers a CPU threshold notification.
How to Configure CPU Thresholding Notification
This section contains the following procedures:
•
Enabling CPU Thresholding Notification
•
Defining CPU Thresholding Notification
•
Setting the Entry Limit and Size of CPU Utilization Statistics
Enabling CPU Thresholding Notification
To specify the recipient of SNMP notification operations and enable CPU thresholding notification, perform these steps:
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
snmp-server enable traps cpu threshold
4.
snmp-server host host-address [traps | informs] [version {1 | 2c | 3 [auth | noauth | priv]}] community-string [udp-port port] cpu [notification-type] [vrf vrf-name]
DETAILED STEPS
Defining CPU Thresholding Notification
To define a rising and a falling CPU threshold notification, perform these steps:
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
process cpu threshold type {total | process | interrupt} rising percentage interval seconds [falling percentage interval seconds]
DETAILED STEPS
Setting the Entry Limit and Size of CPU Utilization Statistics
To set the process entry limit and the size of the history table for CPU utilization statistics, perform these steps:
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
process cpu statistics limit entry-percentage number [size seconds]
DETAILED STEPS
Configuration Examples for CPU Thresholding Notification
The following examples show how to set a rising and a falling CPU thresholding notification:
•
Setting a Rising CPU Thresholding Notification: Example
•
Setting a Falling CPU Thresholding Notification: Example
Setting a Rising CPU Thresholding Notification: Example
The following example shows how to set a rising CPU thresholding notification for total CPU utilization. When total CPU utilization exceeds 80 percent for a period of 5 seconds or longer, a rising threshold notification is sent.
Router(config)# process cpu threshold type total rising 80 interval 5
Note
When the optional falling arguments (percentage and seconds) are not specified, they take on the same values as the rising arguments (percentage and seconds).
Setting a Falling CPU Thresholding Notification: Example
The following example shows how to set a falling CPU thresholding notification for total CPU utilization. When total CPU utilization, which at one point had risen above 80 percent and triggered a rising threshold notification, falls below 70 percent for a period of 5 seconds or longer, a falling threshold notification is sent.
Router(config)# process cpu threshold type total rising 80 interval 5 falling 70 interval 5
Note
When the optional falling arguments (percentage and seconds) are not specified, they take on the same values as the rising arguments (percentage and seconds).
Additional References
For additional information related to the CPU Thresholding Notification feature, refer to the following references:
Related Documents
Standards
Standards TitleNo new or modified standards are supported by this feature and support for existing standards has not been modified by this feature.
—
MIBs
MIBs MIBs LinkCISCO-PROCESS-MIB
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:
RFCs
RFCs TitleNo new or modified RFCs are supported by this feature and support for existing RFCs has not been modified by this feature.
—
Technical Assistance
Command Reference
This section documents only new and modified commands.
•
process cpu statistics limit entry-percentage
•
snmp-server enable traps cpu
process cpu statistics limit entry-percentage
To set the process entry limit and the size of the history table for CPU utilization statistics, use the process cpu statistics limit entry-percentage command in global configuration mode. To disable CPU utilization statistics, use the no form of this command.
process cpu statistics limit entry-percentage number [size seconds]
no process cpu statistics limit entry-percentage
Syntax Description
Defaults
size seconds: 600 seconds
Command Modes
Global configuration
Command History
Usage Guidelines
Use the process cpu statistics limit entry-percentage command to set the entry limit and size of CPU utilization statistics.
Examples
The following example shows how to set an entry limit at 40 percent and a size of 300 seconds:
Router(config)# process cpu statistics limit entry-percentage 40 size 300Related Commands
process cpu threshold type
To set CPU thresholding notification types and values, use the process cpu threshold type command in global configuration mode. To disable CPU thresholding notifications, use the no form of this command.
process cpu threshold type {total | process | interrupt} rising percentage interval seconds [falling percentage interval seconds]
no process cpu threshold type {total | process | interrupt}
Syntax Description
Defaults
CPU thresholding notifications are disabled.
Command Modes
Global configuration
Command History
Usage Guidelines
This command defines CPU usage thresholds that, when crossed, cause a CPU thresholding notification. When this command is enabled, Cisco IOS software polls the system at the configured interval. Notification occurs in two situations:
•
When a configured CPU usage threshold is exceeded (rising percentage)
•
When CPU usage falls below the configured threshold (falling percentage)
Examples
The following example shows how to set the total CPU utilization notification threshold at 80 percent for a rising threshold notification and 20 percent for a falling threshold notification, with a 5-second polling interval.
Router(config)# process cpu threshold type total rising 80 interval 5 falling 20 interval 5Related Commands
snmp-server enable traps cpu
To enable the sending of a CPU thresholding violation notification, use the snmp-server enable traps cpu command in global configuration mode. To disable CPU thresholding notification, use the no form of this command.
snmp-server enable traps cpu threshold
no snmp-server enable traps cpu
Syntax Description
Defaults
SNMP notifications are disabled by default.
Command Modes
Global configuration
Command History
Usage Guidelines
SNMP notifications can be sent as traps or inform requests. This command enables both traps and inform requests.
This command controls (enables or disables) CPU thresholding notification, as defined in the Process MIB (CISCO-PROCESS-MIB).
This command enables the following notifications:
•
cpmCPURisingThreshold—A cpmCPURisingThreshold notification indicates that CPU usage has risen and remained above the configured CPU threshold settings.
•
cpmCPUFallingThreshold—A cpmCPUFallingThreshold notification indicates that CPU usage has fallen and remained below the configured CPU threshold settings.
For a complete description of these notification types, and for information about the other MIB functions, see the CISCO-PROCESS-MIB.my file, available through the Cisco TAC SNMP Object Navigator tool at http://www.cisco.com/go/mibs.
The snmp-server enable traps cpu command is used in conjunction with the snmp-server host command. Use the snmp-server host command to specify which host or hosts receive SNMP notifications. To send SNMP notifications, you must configure at least one snmp-server host command.
Examples
The following example shows how to enable the router to send CPU threshold related informs to the host at the address myhost.cisco.com using the community string defined as public:
Router(config)# snmp-server enable traps cpu thresholdRouter(config)# snmp-server host myhost.cisco.com informs version 2c public cpuRelated Commands
snmp-server host
To specify the recipient of a Simple Network Management Protocol (SNMP) notification operation, use the snmp-server host command in global configuration mode. To remove the specified host from the configuration, use the no form of this command.
snmp-server host host-address [traps | informs] [version {1 | 2c | 3 [auth | noauth | priv]}] community-string [udp-port port] [notification-type] [vrf vrf-name]
no snmp-server host host-address [traps | informs] [version {1 | 2c | 3 [auth | noauth | priv]}] community-string [udp-port port] [notification-type] [vrf vrf-name]
Syntax Description
Defaults
This command is disabled by default. No notifications are sent.
If you enter this command with no keywords, the default is to send all trap types to the host. No informs will be sent to this host.
If no version keyword is present, the default is version 1. If version 3 is specified, but the security level is not specified, the default security level is noauth.
The no snmp-server host command with no keywords will disable traps, but not informs, to the host. In order to disable informs, use the no snmp-server host informs command.
The default UDP port is 162.
Note
If the community-string is not defined using the snmp-server community command prior to using this command, the default form of the snmp-server community command will automatically be inserted into the configuration. The password (community-string) used for this automatic configuration of the snmp-server community will be the same as specified in the snmp-server host command. This is the default behavior for Cisco IOS Release 12.0(3) and later.
Command Modes
Global configuration
Command History
Usage Guidelines
SNMP notifications can be sent as traps or inform requests. Traps are unreliable because the receiver does not send acknowledgments when it receives traps. The sender cannot determine if the traps were received. However, an SNMP entity that receives an inform request acknowledges the message with an SNMP response protocol data unit (PDU). If the sender never receives the response, the inform request can be sent again. Thus, informs are more likely to reach their intended destination.
However, informs consume more resources in the agent and in the network. Unlike a trap, which is discarded as soon as it is sent, an inform request must be held in memory until a response is received or the request times out. Also, traps are sent only once, while an inform may be retried several times. The retries increase traffic and contribute to a higher overhead on the network.
If you do not enter an snmp-server host command, no notifications are sent. In order to configure the router to send SNMP notifications, you must enter at least one snmp-server host command. If you enter the command with no keywords, all trap types are enabled for the host.
In order to enable multiple hosts, you must issue a separate snmp-server host command for each host. You can specify multiple notification types in the command for each host.
When multiple snmp-server host commands are given for the same host and kind of notification (trap or inform), each succeeding command overwrites the previous command. Only the last snmp-server host command will be in effect. For example, if you enter an snmp-server host inform command for a host and then enter another snmp-server host inform command for the same host, the second command will replace the first.
The snmp-server host command is used in conjunction with the snmp-server enable command. Use the snmp-server enable command to specify which SNMP notifications are sent globally. For a host to receive most notifications, at least one snmp-server enable command and the snmp-server host command for that host must be enabled.
However, some notification types cannot be controlled with the snmp-server enable command. For example, some notification types are always enabled. Other notification types are enabled by a different command. For example, the linkUpDown notifications are controlled by the snmp trap link-status command. These notification types do not require an snmp-server enable command.
A notification-type option's availability depends on the router type and Cisco IOS software features supported on the router. For example, the envmon notification-type is available only if the environmental monitor is part of the system. To see what notification types are available on your system, use the command help ? at the end of the snmp-server host command.
The vrf keyword allows you to specify the notifications being sent to a specified IP address over a specific VRF. The VRF defines a VPN membership of a customer so data is stored using the VPN.
Regarding Notification Type Keywords
The notification-type keywords used in the snmp-server host command do not always match the keywords used in the corresponding snmp-server enable traps command. For example, the notification keyword applicable to MPLS traffic engineering tunnels is specified as mpls-traffic-eng (containing two dashes and no intervening spaces). The corresponding parameter in the snmp-server enable traps command is specified as mpls traffic-eng (containing an intervening space and a dash).
This syntax difference is necessary to ensure that the CLI interprets the notification-type keyword of the snmp-server host command as a unified, single-word construct, which preserves the capability of the snmp-server host command to accept multiple notification-type keywords in the CLI command line. The snmp-server enable traps commands, however, often use two-word constructs in order to provide hierarchical configuration options and to maintain consistency with the command syntax of related commands. Table 1 maps snmp-server enable traps commands to the keywords used in the snmp-server host command.
Table 1 Notification Keywords and Corresponding SNMP Enable Traps Commands
SNMP Enable Traps Command SNMP Host Command Keywordsnmp-server enable traps mpls ldp
mpls-ldp
snmp-server enable traps mpls traffic-eng1
mpls-traffic-eng
snmp-server enable traps mpls vpn
mpls-vpn
1 See the Cisco IOS Switching Services Command Reference for documentation of this command.
Examples
If you want to configure a unique SNMP community string for traps, but you want to prevent SNMP polling access with this string, the configuration should include an access list. In the following example, the community string is named comaccess and the access list is numbered 10:
Router(config)# snmp-server community comaccess ro 10Router(config)# snmp-server host 172.20.2.160 comaccessRouter(config)# access-list 10 deny anyThe following example sends RFC 1157 SNMP traps to the host specified by the name myhost.cisco.com. Other traps are enabled, but only SNMP traps are sent because only snmp is specified in the snmp-server host command. The community string is defined as comaccess.
Router(config)# snmp-server enable trapsRouter(config)# snmp-server host myhost.cisco.com comaccess snmpThe following example sends the SNMP and Cisco environmental monitor enterprise-specific traps to address 172.30.2.160:
Router(config)# snmp-server enable traps snmpRouter(config)# snmp-server enable traps envmonRouter(config)# snmp-server host 172.30.2.160 public snmp envmonThe following example enables the router to send all traps to the host myhost.cisco.com using the community string public:
Router(config)# snmp-server enable trapsRouter(config)# snmp-server host myhost.cisco.com publicThe following example will not send traps to any host. The BGP traps are enabled for all hosts, but only the ISDN traps are enabled to be sent to a host.
Router(config)# snmp-server enable traps bgpRouter(config)# snmp-server host bob public isdnThe following example enables the router to send all inform requests to the host myhost.cisco.com using the community string public:
Router(config)# snmp-server enable trapsRouter(config)# snmp-server host myhost.cisco.com informs version 2c publicThe following example sends HSRP MIB informs to the host specified by the name myhost.cisco.com. The community string is defined as public.
Router(config)# snmp-server enable traps hsrpRouter(config)# snmp-server host myhost.cisco.com informs version 2c public hsrpThe following example sends all SNMP notifications to xyz.com over the VRF named trap-vrf:
Router(config)# snmp-server host xyz.com vrf trap-vrfRelated Commands
Copyright © 2004 Cisco Systems, Inc. All rights reserved.
Posted: Mon Aug 16 14:27:24 PDT 2004
All contents are Copyright © 1992--2004 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.