Health Monitoring
Verifying the health of internetwork devices is a common troubleshooting task. Cisco IOS software allows you to view memory and processor utilization statistics, as well as environmental variables such as the temperature of the device as well as the status of power supplies installed within the device.
The show processes command prints information about active processes running on the device, i.e. router or switch. This command can be used to view detailed information about specific processes, detailed CPU utilization statistics, and even detailed memory utilization statistics. The valid keywords that can be used in conjunction with this command are below:
| R2#show processes ? <1-4294967295> Process Number cpu Show CPU use per process history display ordered Process history memory Show memory use per process timercheck Show processes configured for timercheck | Output modifiers <cr> |
NOTE: These options will vary depending on the platform on which the command is issued
The most commonly used keywords are cpu and memory. These keywords displayed detailed CPU utilization statistics as well as the amount of memory used, respectively. Following is a sample output of the show processes cpu command:
| R2#show processes cpu CPU utilization for five seconds: 0%/0%; one minute: 0%; five minutes: 0% PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process 1 0 3 0 0.00% 0.00% 0.00% 0 Chunk Manager 2 84 24809 3 0.00% 0.00% 0.00% 0 Load Meter 3 84 17 4941 0.00% 0.00% 0.00% 0 Exec 4 0 1 0 0.00% 0.00% 0.00% 0 EDDRI_MAIN 5 280786 18847 14898 0.00% 0.27% 0.23% 0 Check heaps 6 24 13 1846 0.00% 0.00% 0.00% 0 Pool Manager 7 0 2 0 0.00% 0.00% 0.00% 0 Timers 8 0 1 0 0.00% 0.00% 0.00% 0 Crash writer[Truncated Output] |
The show processes cpu command prints a lot of information, as can be seen above. When using this command, consider filtering the output using the applicable keywords so as to reduce the amount of information that is returned. The following example illustrates how to filter the output of this command to include only BGP processes:
| R2#show processes cpu | include BGP 120 52 7029 7 0.00% 0.00% 0.00% 0 BGP Router 151 81 1646 49 0.00% 0.00% 0.00% 0 BGP I/O 218 1651 230 7178 0.00% 0.06% 0.00% 0 BGP Scanner |
The show processes cpu command can also be used to view the historical CPU utilization statistics for the device over a 60 second, 60 minute and 72 hour interval by simply appending the history command as illustrated in the following output:
| R1#show processes cpu historyR1 05:04:38 AM Sunday Mar 3 2002 UTC111111 444449999999999889999998800000099999999999899999998888877777 888889999997777449777774400000099999779999899999992222222222 100 ********** ****** ***************** ******* 90 ********** ****** ************************* 80 ************************************************** 70 ******************************************************* 60 ******************************************************* 50 ************************************************************ 40 ************************************************************ 30 ************************************************************ 20 ************************************************************ 10 ************************************************************ 0….5….1….1….2….2….3….3….4….4….5….5….6 0 5 0 5 0 5 0 5 0 5 0 CPU% per second (last 60 seconds) 1
38 |
The show processes memory command displays information about the active processes in the router and the corresponding memory used. Following is a sample output of the show processes memory command:
| R2#show processes memory Processor Pool Total: 53977824 Used: 22192752 Free: 31785072 I/O Pool Total: 3729408 Used: 2131648 Free: 1597760PID TTY Allocated Freed Holding Getbufs Retbufs Process 0 0 32967392 13607204 15720348 0 0 *Init* 0 0 12052 636100 12052 0 0 *Sched* 0 0 29197288 27868336 2512444 380484 380484 *Dead* 0 0 0 0 490880 0 0 *MallocLite* 1 0 15104 0 22116 0 0 Chunk Manager 2 0 196 196 4012 0 0 Load Meter 3 0 22236 22076 13188 0 0 Exec 4 0 65588 0 90600 0 0 EDDRI_MAIN 5 0 3296 196 10112 0 0 Check heaps 6 0 210936 274452 26188 199980 233400 Pool Manager 7 0 196 196 7012 0 0 Timers 8 0 0 0 25012 0 0 Crash writer[Truncated Output] |
As is applicable with the show processes cpu command, the show processes memorycommand prints a lot of information. Again, keep in mind that the filtering options that are applicable with other commands can also be used with this command to reduce the amount of information that is printed by this command. The following illustrates how to use Cisco IOS filters to include only memory utilization information for different BGP processes:
| R2#show processes memory | section BGP 120 0 45584 0 10096 0 0 BGP Router 151 0 0 0 7036 0 0 BGP I/O 218 0 0 0 10048 0 0 BGP Scanner |
In addition to the show processes memory command, you can also use the show memorycommand to display summary information about processor and I/O memory, followed by a more comprehensive report of memory utilization. The show memory command supports the following keywords or options:
| R2#show memory ? allocating-process Show allocating process name dead Memory owned by dead processes debug Memory debugging commands failures Memory failures fast Fast memory stats fragment Summary of memory fragment information free Free memory stats io IO memory stats multibus Multibus memory stats overflow memory overflow corrections pci PCI memory stats processor Processor memory stats statistics Mempool Statistics summary Summary of memory usage per alloc PC transient Transient memory stats |
While delving into the specifics on all applicable or valid keywords is beyond the scope of the TSHOOT certification exam, the show memory allocating-process totals or show memory summary commands are two of the most commonly used options when troubleshooting memory allocation issues. The output printed by these commands can be decoded using the Cisco Output Interpreter, which is available online, and is also commonly requested by the Technical Assistance Center (TAC) for troubleshooting allocation issues.
NOTE: As is applicable with other Cisco IOS show commands, you can filter the output that is printed by this command or redirect it to an external location for further analysis.
And finally, the last health monitoring and troubleshooting command that we are going to be discussing in this section is the show environment command. This command provides information the status of your router fans, power supply, system board temperature, and more. However, it should be noted that this command is supported in Cisco 2600XM and ISR-series routers, as well as Catalyst 3750, 4500 and 6500 series switches.
Once a minute a routine is run that gets environmental measurements from sensors and stores the output into a buffer. This buffer is displayed on the console when the show environmentcommand is entered. In the event that a measurement exceeds desired margins, but has not exceeded fatal margins, a warning message is printed to the system console. Cisco IOS software queries the sensors for measurements once a minute, but warnings for a given test point are printed at most once every hour for sensor readings in the warning range and once every 5 minutes for sensor readings in the critical range. If a measurement is out of line within these time segments, an automatic warning message appears on the console. If a shutdown occurs because of detection of fatal environmental margins, the last measured value from each sensor is stored in internal nonvolatile memory.
You can also enable SNMP notifications (traps or informs) to alert an NMS when environmental thresholds are reached using the snmp-server enable traps envmon global configuration command in conjunction with the other SNMP configuration commands. Whenever Cisco IOS software detects a failure or recovery event, it sends an SNMP trap to the configured SNMP server. Unlike console messages, only one SNMP trap is sent when the failure event is first detected. Another trap is sent when the recovery is detected. The following shows the options that are available with the show environment command on a Catalyst 6500 series switch. Keep in mind that these options will vary depending on platform:
| Catalyst-6500-Core-Switch#show environment ? alarm show environmental alarms connector show connector parameters cooling show cooling parameters status operational status of FRU temperature temperature readings voltage voltage readings | Output modifiers <cr> |
On a Cisco 2800 series router, the following options can be used with this command:
| R4#show environment ? all All environmental monitor parameters last Last environmental monitor parameters table Temperature and voltage ranges | Output modifiers <cr> |
Following is the output of the show environment command for information on one specific module on a Catalyst 6500 series switch. The information printed by this command will vary depending on the chassis and modules:
| Catalyst-6500-Core-Switch#show environment status module 5 module 5: module 5 power-output-fail: OK module 5 outlet temperature: 30C module 5 inlet temperature: 25C module 5 device-1 temperature: 37C module 5 device-2 temperature: 36C module 5 asic-1 (SSO-1) temp: 26C module 5 asic-2 (SSO-2) temp: 26C module 5 asic-3 (SSO-3) temp: 25C module 5 asic-4 (SSO-4) temp: 26C module 5 asic-5 (SSA-1) temp: 26C module 5 asic-6 (HYPERION-1) temp: 26C |
Following is the output of the show environment command on a Cisco 2800 series router:
| R4#show environmentMain Power Supply is ACFan 1 OK Fan 2 OK Fan 3 OK Fan Speed Setting: Normal System Temperature: 26 Celsius (normal) Environmental information last updated 00:00:29 ago |