System Health Monitoring
Monitoring critical system resources is very important to maintain stability of the network. We recommend that you monitor the switch CPU, memory, file systems, and environmental resources on a regular basis.
This workflow discusses the commonly used commands and procedures to monitor and maintain system health.
Prerequisites for System Health Monitoring
Obtain information about your switch such as the running software release, duration of switch run time, and the reason for the most recent reload. To obtain this information, use the show version command. The command with the pipe feature gives the duration of uptime and any reload information.

Show Running Status
Identify the reasons for uptime and reload. Over time, switches can crash and reload without your knowledge.
Step 1 Use the show version command to retrieve the overall switch status.
If you are only interested in the switch uptime and last reload, you can run a more direct command using the pipe “|” feature built into Cisco IOS XE (and Cisco IOS) software.
This example shows that Cisco IOS XE release 3.3.2 SE was running for five weeks before a privileged user initiated a switch reload.

Run a System Baseline for Core Resources
Set your system baseline usage during normal production time and determine if there is a change from your expected resource values. If the increase in usage is not justified, investigate to find the cause. Ideally, it is best to setup some form of Network Monitoring System (NMS) to automatically monitor these values, however it is also important to learn how to manually poll these values.
After you have identified the switch running status, examine core resources to ensure that they are all at optimal values.
Obtain CPU and Core Processor Usage
Step 2 Use the show process cpu command to display CPU and core processor usage.
To find CPU usage due to the subprocesses and tasks operating under a specific process, use the show process cpu detailed command. To sort for high activity usage, use show process cpu sorted command.
CPU usage can be monitored on a per-switch basis in a stacked environment.
At periodic intervals, we recommend that you run the following variations of the show process cpu command.

Note The switch is a multicore platform that is different from its predecessors. A single core can experience high CPU, so it is important to monitor each core when running these commands.
This output shows the five-second, one-minute, and five-minute periods on each CPU core. It also
shows the Forwarding Engine Driver (FED), IOS daemon IOSd, and Wireless Controller Module (WCM) processes have the highest CPU utilization.

Step 3 Use the history command to display a graph of sustained CPU utilization.
This graph helps to formulate patterns. For example, if you observe a spike to 100 percent every 30 minutes, you can conclude that something might be polling the switch on a regular schedule. Examine your SNMP configuration to help determine the cause.

For detailed information to help troubleshoot your high CPU usage concerns, see the Catalyst 3850 Series Switch High CPU Usage Troubleshooting document.
Obtain Switch Memory Usage
Step 4 Use the show process memory command to display the state of memory usage on your switch.
To find memory usage due to the subprocesses and tasks operating under a specific process, use the show process memory detailed command. To sort for high activity usage, use the show process memory detailed sorted command.
Memory usage can be monitored on a per-switch basis in a stacked environment.

Monitor File Systems Usage
Step 5 At regular intervals, use the show file systems command to monitor the file systems within the switch to ensure that there is always sufficient space available.
Unlike previous platforms, the switch writes crash files to a separate directory. For example, the show file systems command output shows that the crashifo folder is populated. Compare the size of the folder against the free space available.
The switch has different file systems that can be listed by using the show file systems command.


Note An (*) asterisk indicates the default file system. If the file system has a dash (-) or a zero (0) for the Size(b) field, that indicates that the file system is not present or not recognized.
Step 6 Use the dir filesystem or the show filesystem command to list the files under a specific files system.
When you find crash files, it is important to immediately retrieve them to diagnose a system failure or unexpected crash.
This example shows that crash files were created in the directory.

Run a System Baseline for Environmental Resources
Step 7 Use the show environment command to display an overview of switch health.
It is important to monitor environmental resource values because something as small as a fan failure can lead to a serious hardware problem. If your switches provide Power Over Ethernet (POE), then the show environment command will also provide a view into the power supplies and if they are performing as expected.

Step 8 If your switches are in a stack, run the show environment stack command to view all of the environmental outputs stack wide.
Although some of settings are adjustable, we recommend leaving the settings with their default values.

Other System Monitoring Considerations
Spanning Tree Monitoring
Spanning tree design is beyond the scope of this document, however, the goal of this procedure is to provide simple spanning tree monitoring commands. It is important to always understand your spanning tree topology within your network. There are a number of simple commands that you can run to verify that your switch is performing the expected spanning tree role.
Step 9 Use the show spanning-tree summary command to periodically monitor the stability of your spanning tree environment and ensure a loop-free environment.
This example output shows that the switch is actually operating as the root bridge for all of the VLANs which can cause extreme network degradation if incorrectly configured.

Step 10 Use the show spanning-tree detail command to frequently check STP stability.
This command displays network stability information about the number of topology changes within each VLAN, the last time a TCN was received, and so forth. Frequently monitoring this information is critical to maintaining overall health of the switch and network.
