CCNA 200-301

CCNP Enterprise

CCNP Security

CCIE Enterprise Lab

CCIE Security Lab

CCNP Service Provider

CCNP Data Center

CCNP Collaboration

CCIE DC Lab

Sustained high resource utilization on a Cisco router degrades forwarding performance, increases packet transit latency, and can destabilize control plane protocols such as BGP, OSPF, and LDP. When control plane queues fill up, keepalive packets drop, leading to peer timeouts and network flaps. Routinely checking and establishing baselines for CPU and RAM consumption enables network engineers to distinguish between expected traffic-driven surges and critical system anomalies like routing storms, broadcast storms, or memory leaks.

This guide provides practical commands, interpretation models, troubleshooting workflows, automation scripts, and reference tooling to manage CPU and memory utilization across Cisco IOS and IOS-XE platforms.


Primary Cisco IOS and IOS-XE Commands for CPU and Memory

Cisco routers provide several granular EXEC-level commands to inspect resource allocation in real time and over rolling time windows.

1. Checking CPU Utilization

To evaluate general processor load and inspect individual tasks, use the following commands in enable mode:

  • show processes cpu
    Displays overall CPU utilization for the past five seconds, one minute, and five minutes, followed by an unsorted tabular list of every active system process.
  • show processes cpu sorted
    Appends sorting parameters to filter the process table. Use show processes cpu sorted 5min or show processes cpu sorted 1min to immediately place the highest resource-consuming processes at the top of the terminal output.
  • show processes cpu history
    Renders an ASCII-based bar chart of CPU consumption across three distinct periods: the past 60 seconds (measured second-by-second), the past 60 minutes (measured minute-by-minute), and the past 72 hours (measured hour-by-hour). This assists in pinpointing when a spike originated without external monitoring software.

2. Checking Memory Allocation

RAM on Cisco routers is segmented into different pools, primarily Processor memory (used for routing engines, process states, and operating system overhead) and I/O memory (used for interface packet buffering).

  • show memory statistics
    Provides a high-level summary of total, used, and available RAM across all hardware memory pools.
  • show processes memory sorted
    Lists all active processes ordered by the amount of RAM currently allocated, detailing allocated bytes, freed bytes, and current holding bytes per process.
  • show memory allocating-process totals
    Aggregates memory allocation by the calling subsystem, making it easier to spot subsystem-level leaks.

3. IOS-XE Hardware Platform Checks

On modular and modern fixed-configuration routers running Cisco IOS-XE (such as the ASR 1000, ISR 4000, and Catalyst 8000 series), processor architecture is split between the Control Plane (Route Processor) and the Data Plane (QuantumFlow Processor or QFP).

  • show platform resources
    Provides an immediate overview of chassis-wide resource consumption, highlighting CPU, memory, and crypto hardware states across all control and service modules.
  • show platform hardware qfp active datapath utilization
    Displays packet-processing utilization specifically for the QFP data engine, distinguishing traffic processing load from control plane overhead.

How to Interpret Cisco Router Show Output and Establish Baselines

Running diagnostic commands is only the first step; interpreting the output correctly prevents false alarms and identifies critical system degradation early.

Dissecting show processes cpu

When executing show processes cpu, the summary header provides essential telemetry:

Router# show processes cpu
CPU utilization for five seconds: 98%/12%; one minute: 82%; five minutes: 75%
 PID Runtime(ms)   Invoked      uSecs   5Sec   1Min   5Min TTY Process 
   1           0         4          0  0.00%  0.00%  0.00%   0 Chunk Manager    
  84     1284920    284910       4509 84.12% 70.40% 62.15%   0 IP Input
  1. Total vs. Interrupt Load:
    In 98%/12%, the first value (98%) is total CPU utilization during the last five seconds. The second value (12%) represents CPU cycles spent handling hardware interrupts.
  2. Process-Level Load:
    Subtracting the interrupt percentage from the total yields the process-level load (98% - 12% = 86%).

    • High Interrupt Percentage: Indicates that the router is servicing high rates of packets switched via software (process switching) instead of hardware (Cisco Express Forwarding), broadcast storms, or excessive packet punts.
    • High Process Percentage: Indicates internal software routines—such as BGP recalculation, OSPF Dijkstra computations, active SSH/SNMP management connections, or executive background jobs—are consuming the processor.
  3. Five-Second vs. Five-Minute Trends:
    A high five-second figure paired with low one-minute and five-minute averages points to a brief, harmless burst. Sustained values across all three figures confirm ongoing congestion.

Dissecting show memory statistics

Router# show memory statistics
                Head    Total(b)     Used(b)     Free(b)   Lowest(b)  Largest(b)
Processor   21AB4000   268435456   184549376    83886080    12451840    64201824
      I/O    E000000    33554432    12845056    20709376    18450200    19842112
  • Total, Used, Free: Identifies raw capacity and remaining buffers across pools.
  • Lowest: The historic minimum amount of free memory available since the last router reboot (the water-mark low). If this number approaches zero, the router came close to an out-of-memory crash.
  • Largest: The largest single contiguous block of free memory available. If Free(b) indicates ample remaining memory (e.g., 80 MB) but Largest(b) is small (e.g., 200 KB), the router’s memory is fragmented, preventing large buffers from allocating.

Normal Operational Baselines

  • CPU Utilization: Typical steady-state load on an edge or core router ranges between 10% and 45%. Brief spikes up to 90% during full routing table convergence (e.g., pulling a dual BGP feed) are normal. Sustained utilization above 75% warrants investigation.
  • Interrupt Levels: Interrupt load under standard conditions should remain below 10%. Any value consistently above 20% indicates a data plane routing inefficiency.
  • Memory Health: Healthy systems maintain flat or steady memory usage after convergence. Free memory should not trend downward continuously over weeks or months.

Troubleshooting High CPU and Memory Exhaustion

When utilization exceeds operational baselines, follow this sequential diagnostic workflow to locate the source of exhaustion.

                    [High Resource Utilization Alert]
                                    |
                    Is the bottleneck CPU or Memory?
                                    |
        +---------------------------+---------------------------+
        |                                                       |
   [High CPU]                                             [High Memory]
        |                                                       |
Check Interrupt % in                                  Run 'show memory statistics'
'show processes cpu'                                  Check Lowest and Largest fields
        |                                                       |
  +-----+-----+                                        Run 'show processes memory sorted'
  |           |                                                 |
[> 20%]    [< 10%]                                    Does one process hold
Interrupt   Process                                   excessive/growing bytes?
  Level      Level                                              |
    |          |                                       +--------+--------+
    |    Run 'show processes                           |                 |
    |    cpu sorted 5min'                            [Yes]              [No]
    |          |                                       |                 |
    |    Identify top PID                      Possible Memory    Buffer Pool Depletion
    |    (BGP, OSPF, SNMP, etc.)                     Leak         Inspect 'show buffers'
    |          |                                       |                 |
    |    Check table stability                 Collect TAC trace  Tune pool sizes or
    |    or poll rates                         Schedule bug fix   remediate drop bursts
    |
Investigate Data Plane:
1. Verify CEF ('show ip cef')
2. Inspect punt counters ('show platform software punt statistics')
3. Check for ACL log triggers and broadcast loops

Step 1: Diagnose High CPU Caused by High Interrupts

If interrupt usage dominates the 5-second CPU header, software is handling transit packets:

  1. Verify Cisco Express Forwarding (CEF): Run show ip cef. If CEF is disabled or misconfigured on an interface (no ip route-cache), transit packets fall back to process switching via the central processor.
  2. Inspect Packet Punts (IOS-XE): Execute show platform software punt statistics. Identify which punt cause increments rapidly (e.g., ARP resolution, TTL expired, ICMP redirects, or unestablished ACL matches).
  3. Check for Excessive Logging: Access control lists ending with the log or log-input argument force matching packets out of hardware ASIC forwarding into software to generate syslog messages. Remove logging keywords under active attack or heavy traffic conditions.

Step 2: Diagnose High CPU Caused by High Process Usage

If interrupt levels are low and specific processes dominate show processes cpu sorted 5min:

  • IP Input: Indicates software-switched packets are queuing up for processor attention. Correlate with show interfaces looking for broadcast floods or runt/giant framing errors.
  • BGP Router or OSPF-x-Router: High load during convergence is normal. If persistent, check neighbor flapping using show ip bgp summary or show ip ospf neighbor, and check for unstable flapping prefixes via route flap damping or external upstreams.
  • SNMP ENGINE: Indicates that an external Network Management System (NMS) is walking large MIB trees (such as complete IP routing tables) with tight polling intervals. Adjust polling intervals or restrict MIB views.

Step 3: Diagnose Memory Leaks and Buffer Depletion

Memory issues typically present as allocation failures or persistent pool drainage:

  1. Identify the Leaking Process: Run show processes memory sorted. Record the top allocating processes. Repeat the command over several hours. If a process shows monotonically increasing Holding memory that never releases, it points to a Cisco software defect (memory leak).
  2. Check for Buffer Starvation: Execute show buffers. Look at the Small, Middle, Big, VeryBig, and Large buffer headers. Rapidly incrementing failures and no memory counters indicate that interface bursts have starved available system buffers, leading to packet drops.

Step 4: Remediation Strategies

  • Implement Control Plane Policing (CoPP): Protect the Route Processor from packet floods by rate-limiting control plane traffic (ICMP, SSH, routing protocols) using modular QoS CLI (MQC).
  • Tune Infrastructure Services: Increase SNMP poll intervals from 30 seconds to 300 seconds; rate-limit SSH management sessions; disable unused IP services (no ip redirects, no ip unreachables, no ip proxy-arp).
  • Address Software Defects: If show processes memory sorted confirms a memory leak in core system routines (e.g., Net Input or BGP Router), consult the Cisco Bug Search Tool using your current IOS/IOS-XE release and schedule a maintenance upgrade.

Automating Resource Monitoring with Python and Cisco EEM

Relying entirely on manual CLI inspection is impractical across large networks. Engineers can automate data collection using centralized scripts or on-box event handlers.

1. Python (Netmiko) Automation Script

The following script connects to a Cisco router, queries CPU and memory health, parses the current operational state, and alerts if values exceed specified thresholds.

import re
from netmiko import ConnectHandler

ROUTER_DEVICE = {
    "device_type": "cisco_ios",
    "host": "192.168.1.1",
    "username": "admin",
    "password": "SecurePassword123",
    "secret": "EnableSecret123",
}

CPU_THRESHOLD = 80  # Percent
MEM_FREE_THRESHOLD = 15  # Minimum percent free memory


def inspect_router_health(device_params):
    connection = ConnectHandler(**device_params)
    connection.enable()

    # 1. Evaluate CPU Utilization
    cpu_output = connection.send_command("show processes cpu")
    cpu_regex = r"five minutes:\s+(\d+)%"
    cpu_match = re.search(cpu_regex, cpu_output)

    if cpu_match:
        cpu_5min = int(cpu_match.group(1))
        print(f"[{device_params['host']}] 5-Minute CPU Utilization: {cpu_5min}%")
        if cpu_5min >= CPU_THRESHOLD:
            print(f"  [ALERT] CPU exceeded threshold ({CPU_THRESHOLD}%)!")
    else:
        print("  [ERROR] Unable to parse CPU metrics.")

    # 2. Evaluate Memory Statistics
    mem_output = connection.send_command("show memory statistics")
    # Captures: Pool, Head, Total, Used, Free
    mem_regex = r"^Processor\s+[0-9a-fA-F]+\s+(\d+)\s+(\d+)\s+(\d+)"
    mem_match = re.search(mem_regex, mem_output, re.MULTILINE)

    if mem_match:
        total_mem = int(mem_match.group(1))
        used_mem = int(mem_match.group(2))
        free_mem = int(mem_match.group(3))

        free_percent = (free_mem / total_mem) * 100
        print(
            f"[{device_params['host']}] Processor RAM: {free_percent:.2f}% Free "
            f"({free_mem} / {total_mem} bytes)"
        )

        if free_percent <= MEM_FREE_THRESHOLD:
            print(f"  [ALERT] Free memory below threshold ({MEM_FREE_THRESHOLD}%)!")
    else:
        print("  [ERROR] Unable to parse memory pool metrics.")

    connection.disconnect()


if __name__ == "__main__":
    inspect_router_health(ROUTER_DEVICE)

2. Cisco Embedded Event Manager (EEM) On-Box Applet

You can configure Cisco routers to autonomously monitor their own processor thresholds and capture diagnostic dumps locally when a spike occurs.

! Define an EEM applet triggering when 5-min CPU exceeds 80%
event manager applet MONITOR_HIGH_CPU
 event snmp oid 1.3.6.1.4.1.9.9.109.1.1.1.1.5.1 get-type exact entry-op gt entry-val 80 poll-interval 10
 action 1.0 syslog priority critical msg "EEM: High CPU detected (>80%). Logging processes."
 action 2.0 cli command "enable"
 action 3.0 cli command "show clock | append flash:cpu_diagnostic.log"
 action 4.0 cli command "show processes cpu sorted 5min | append flash:cpu_diagnostic.log"
 action 5.0 cli command "show memory statistics | append flash:cpu_diagnostic.log"

Note: OID 1.3.6.1.4.1.9.9.109.1.1.1.1.5.1 maps to the cpmCPUTotal5minRev metric in the CISCO-PROCESS-MIB.


Enterprise Monitoring Tools for Continuous Tracking

Enterprise infrastructure requires continuous monitoring systems (NMS) to collect metrics, graph historical trends, and trigger proactive alerts before resource depletion affects end users.

ToolPrimary Collection ProtocolDeployment ModelAlerting & Telemetry StrengthsBest Suited For
Cisco Catalyst Center (formerly DNA Center)Streaming Telemetry (gNMI/NETCONF), SNMPOn-Premises ApplianceMachine-learning baselining; automated Root Cause Analysis (RCA); native stack analytics.Pure Cisco enterprise environments requiring deep hardware lifecycle telemetry.
SolarWinds Network Performance Monitor (NPM)SNMPv2c/SNMPv3, WMIOn-Premises Windows ServerPre-built Cisco MIB support; automatic threshold alerts; interface packet correlation.Traditional mid-to-large enterprise data centers managing multi-vendor gear.
PRTG Network MonitorSNMP, NetFlow, REST APIOn-Premises Windows ServerOut-of-the-box Cisco CPU/Memory sensor templates; color-coded threshold status.Small to mid-sized IT teams seeking quick deployment with minimal configuration overhead.
ZabbixSNMP, Zabbix Agent, IPMISelf-Hosted Linux (Open Source)Highly customizable low-level discovery (LLD); trigger expressions for sustained loads; zero licensing cost.Engineering teams prioritizing open-source observability and custom trigger logic.
Prometheus + GrafanaSNMP Exporter, gNMI TelemetryContainerized / Hybrid CloudHigh-frequency time-series storage; PromQL query flexibility; rich visual dashboards.Modern NetDevOps operations integrating network infrastructure into cloud-native observability stacks.

Official Cisco Documentation and Reference Guides

For authoritative guidance, formal definitions, and TAC escalation requirements, consult the following official documentation resources:

Core TAC Troubleshooting Notes

  • Cisco TAC Document ID 46109: Troubleshooting High CPU Utilization on Cisco Routers
    Defines structural differences between process-level and interrupt-level resource starvation across standard architectures.
  • Cisco TAC Document ID 15130: Troubleshooting Memory Problems on Cisco Routers
    Comprehensive guide for resolving SYS-2-MALLOCFAIL errors, pool fragmentation, and tracing processor memory allocation routines.

Key Cisco Architecture Concepts

  • Cisco Express Forwarding (CEF) Switching:
    Documents the separation between the distributed hardware forwarding plane and the central software route engine. Disabling CEF remains the primary cause of sudden interrupt-level CPU spikes.
  • Control Plane Policing (CoPP):
    Cisco IOS and IOS-XE architectural framework used to configure QoS filters on traffic directed at the router’s physical Route Processor.

Standard MIB References for System Resources

  • CISCO-PROCESS-MIB (1.3.6.1.4.1.9.9.109):
    Contains official OIDs for evaluating individual core loads and task schedulers (cpmCPUTotal5secRev, cpmCPUTotal1minRev, cpmCPUTotal5minRev).
  • CISCO-MEMORY-POOL-MIB (1.3.6.1.4.1.9.9.48):
    Provides standardized SNMP access to data pool structures (ciscoMemoryPoolUsed, ciscoMemoryPoolFree, ciscoMemoryPoolLargestFree).

Maintaining stable CPU and memory utilization on a Cisco router requires understanding the division between control plane processing and data plane forwarding. By using sorted CLI commands, distinguishing interrupt load from process load, establishing regular baselines, and implementing automated scripts or NMS tools, network engineers can spot and mitigate performance issues before they cause network outages.

Please follow and like us:
Last modified: November 17, 2026

Author

Comments

Write a Reply or Comment

Your email address will not be published.