Displaying Historical CPU Values

Problem

You want to display the router's historical CPU utilization values.

Solution

To display the router's historical CPU values, use the show processes cpu history command:

Router# show processes cpu history

Router 03:48:18 PM Monday Apr 17 2006 EDT

 
 555559999999999999999
 5 444449999999999999999
100 ******************
 90 ******************
 80 ******************
 70 ******************
 60 ******************
 50 ***********************
 40 ***********************
 30 ***********************
 20 ***********************
 10 * ***********************
 0....5....1....1....2....2....3....3....4....4....5....5....
 0 5 0 5 0 5 0 5 0 5 
 CPU% per second (last 60 seconds)
 
 99 1 9999
 99 1 4 9999
100 ** ***#*#
 90 ** **##*#
 80 #* *###*#
 70 #* *###*#
 60 #* *###*#
 50 #* *#####
 40 #* *#####
 30 #* ######
 20 ## ######
 10 ## * ######
 0....5....1....1....2....2....3....3....4....4....5....5....
 0 5 0 5 0 5 0 5 0 5 
 CPU% per minute (last 60 minutes)
 * = maximum CPU% # = average CPU%
 11 
 9111 111 121 1 121 131009 111111 11 112 1111 12 21 1111 1 11 2221 
 9113776097349362207994009990236246707314992025700880288101471605900356
100 * *** 
 90 * *** 
 80 * *** 
 70 * *** 
 60 * *** 
 50 * *** 
 40 * * *** 
 30 * * *** *
 20 * ** ** * ** *** * * * * * * * **** *
 10 #***********************************************************************
 0....5....1....1....2....2....3....3....4....4....5....5....6....6....7.
 0 5 0 5 0 5 0 5 0 5 0 5 0 
 CPU% per hour (last 72 hours)
 * = maximum CPU% # = average CPU%

Router#

Cisco added the history keyword to the show processes cpu command in 12.2(2)T. The history keyword displays the historical CPU values in graph form consisting of three panes: one second, one minute, and one hour increments. In total, the router keeps 72 hours worth of historical CPU values.

Discussion

Traditionally, the router would only display up to 5 minutes worth of CPU utilization history via the show processes cpu command. With the introduction of the history keyword, the router maintains 72 hours worth of CPU utilization history.

Initially the graph output of this command can be confusing, but once you understand the layout and calculations behind the three graphs, you will find the output to be quite efficient.

The top-most graph is the one second pane, which graphs the real-time CPU utilization once a second. As with all three graphs, the most recent statistics appear at the left side of the graph and gradually move to the right as they age out. In all, the router displays 60 one second snapshots of the router CPU utilization before moving to the next graph down.

The middle graph displays the one-minute CPU utilization average as well as the peak CPU value reached during that minute. The average utilization is graphed using the "#" symbol and the peak utilization during the minute is graphed using the "*" symbol. More about the graphing symbols shortly. The number at the top of each column indicates the actual peak reached during the minute. It's important to point out that the peak value may have been reached once or multiple times during the minute.

The bottom graph displays the CPU average and peak utilization values reached during the hour. This graph maintains 72 values, or 3 days worth of data, before the router refreshes the data. Values older than this 72 hour limit are lost forever.

Let's take a closer look at the graphic representation of the CPU data and explain how the graphs are displayed:

 CPU% per second (last 60 seconds)
 
 99 1 9999
 98 1 4 9999
100 ** ***#*#
 90 ** **##*#
 80 #* *###*#
 70 #* *###*#
 60 #* *###*#
 50 #* *#####
 40 #* *#####
 30 #* ######
 20 ## ######
 10 ## * ######
 0....5....1....1....2....2....3....3....4....4....5....5....
 0 5 0 5 0 5 0 5 0 5 
 CPU% per minute (last 60 minutes)
 * = maximum CPU% # = average CPU%

In this example, we've displayed only the middle graph, the one minute interval graph, for demonstration purposes. The numbers at the far left of the graph indicate CPU utilization and the numbers across the bottom of the graph indicate time, in minutes. As we mentioned earlier, the value at the left-most column is the most recent data, and it gradually moves to the right each minute.

At the top of the left-most column is a number written vertically, indicating the true peak value during the one minute interval. In this case, the peak CPU utilization was 99 percent. The text-based graph also represents the peak utilization using the " *" symbol.

On the same column, the average CPU utilization for the minute is graphed using the " #" symbol. Keep in mind that the graph is plus or minus 5 percent accurate, meaning in this example the average utilization for the minute was between 75 percent and 84 percent.

We would like to be able to offer useful rules of thumb about what CPU utilization values are acceptable and what values start to cause network perfomance problems. Unfortunately, this isn't really possible. How well your router copes with a high CPU utilization depends on many factors, including the specific hardware platform, the use of routing optimizations like CEF, and most importantly, on what specifically is causing the high CPU load. For example, high-end modular routers like the 7600 distribute most routine packet-forwarding fuctions to the media modules. So a high CPU load may not have an effect on real network performance. The best advice we can offer is to watch your routers and try to establish a rough baseline for what CPU load values are normal.

The history keyword allows you to quickly glance at the 3 graphs and get a good overall understanding of the CPU utilization over the past 72 hours. Sometimes a five-minute average just isn't sufficient to understand the health of the router's CPU. You will find this command very useful.






Cisco IOS Cookbook
Cisco IOS Cookbook (Cookbooks (OReilly))
ISBN: 0596527225
EAN: 2147483647
Year: 2004
Pages: 505
Simiral book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net