Guest

Cisco 7500 Series Routers

High CPU Utilization in Exec and Virtual Exec Processes

Cisco - High CPU Utilization in the EXEC and Virtual EXEC Processes

Document ID: 41100

Updated: Dec 12, 2008

   Print

Introduction

This document explains the Exec and Virtual Exec processes, and how to troubleshoot high CPU utilization in these processes.

Prerequisites

Requirements

Cisco recommends that you read Troubleshooting High CPU Utilization on Cisco Routers before you proceed with this document.

Components Used

This document is not restricted to specific software and hardware versions.

The information presented in this document was created from devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If you are working in a live network, ensure that you understand the potential impact of any command before using it.

Conventions

For more information on document conventions, refer to the Cisco Technical Tips Conventions.

What are the Exec and Virtual Exec Processes?

The Exec process in Cisco IOS® software is responsible for communication on the tty lines (console, auxiliary, asynchronous) of the router. The Virtual Exec process is responsible for the vty lines (telnet sessions).

The Exec and Virtual Exec processes are Medium-priority processes, so if there are other processes that have a higher priority (High or Critical), the higher priority processes get the CPU resources.

router#show process | i CPU|Exec 
CPU utilization for five seconds: 0%/0%; one minute: 0%; five minutes: 0% 
 PID QTy       PC Runtime (ms)    Invoked   uSecs    Stacks TTY Process 
  22 M*         0         9644       1733    5564 9732/12000  0 Exec 
  46 ME  80468980           28          6    466610520/12000 66 Virtual Exec 

Refer to The show processes Command for a full explanation of the output from this command.

How Can the Exec and Virtual Exec Processes Cause High CPU Utilization?

If there is a lot of data transferred through these sessions, the CPU utilization for the Exec process increases.

This is because when the router wants to send a simple character through these lines, the router uses some CPU resources:

  • For the console (Exec), the router uses one interrupt per character.

    The console interrupt can be seen in the show stacks command output:

    router#show stacks 
         Minimum process stacks: 
         Free/Size   Name 
         11516/12000  Router Init 
         9404/12000  Init 
         5520/6000   AIM_MIB_CREATION 
         5448/6000   RADIUS INITCONFIG 
         9728/12000  Virtual Exec 
         Interrupt level stacks: 
         Level    Called Unused/Size  Name 
         1    23035463   7008/9000  Network interfaces 
         2           0   9000/9000  Timebase Reference Interrupt 
         3           0   9000/9000  PA Management Int Handler 
         6        9791   8892/9000  16552 Con/Aux Interrupt 
         7  1334963882   8920/9000  MPC860 TIMER INTERRUPT 
    
    
  • For the vty line (Virtual Exec), the telnet session has to build a TCP packet and send the character(s) to the telnet client.

Troubleshoot High CPU Utilization in the Exec Process

Listed here are some possible reasons for high CPU utilization in the Exec process:

  • Too much data is sent through the console port.

    Too many console messages generated by the router is a possible cause.

    1. Check to see if any debugs have been started on the router with the show debugging command.

    2. Disable console logging on the router with (no logging console ).

    3. Verify if a long output is printed on the console (for example, a show tech-support or a show memory ).

  • There is a bug in the Cisco IOS software.

    Use the Bug Toolkit (registered customers only) to look for bugs with this symptom in your Cisco IOS software release.

  • The exec command is configured for asynchronous and auxiliary lines.

    • If a line has only outgoing traffic, the Exec process should be disabled for this line, because if the device (for example, a modem) attached to this line sends some unsolicited data, the Exec process starts on this line.

    • If the router is used as terminal-server (for reverse telnet to other device consoles), it is recommended that you configure no exec on the lines that are connected to the console of the other devices. Data that comes back from the console might otherwise start an EXEC process, which uses CPU resources.

Troubleshoot High CPU Utilization in the Virtual Exec Process

Listed here are some possible reasons for high CPU utilization in the Virtual Exec process:

  • A software bug in the Cisco IOS software

    Use the Bug Toolkit (registered customers only) to look for bugs with this symptom for your Cisco IOS software release.

  • Too much data is sent across the telnet sessions.

    The most common reason for high CPU utilization in the Virtual Exec process is that too much data is transferred from the router to the telnet session.

    This can happen when commands with long outputs (such as show tech-support, show memory, and so on) are executed from the telnet session.

    The amount of data transferred through each vty session can be verified with the show tcp command:

    router#show tcp vty 0
     
    
    tty66, virtual tty from host 10.48.77.64 
    Connection state is ESTAB, I/O status: 1, unread input bytes: 1 
    Local host: 10.48.77.27, Local port: 23 
    Foreign host: 10.48.77.64, Foreign port: 11006 
    
    ........ 
    
    Datagrams (max data segment is 1460 bytes): 
    Rcvd: 525 (out of order: 0), with data: 53, total data bytes: 87 
    Sent: 366 (retransmit: 257, fastretransmit: 0), with data: 356, total data bytes: 
    158187 
    
  • A hung telnet session leads to a high CPU due to the Virtual Exec process. In order to clear the hung telnet session, the device needs to be reloaded in most cases. The other way to clear the hung telnet session is to clear the TCP process. The TCP process can be identified with the command show tcp brief as in this output:

Router#show tcp brief
TCB       Local Address           Foreign Address        (state)
02FA62D0  172.16.152.75.23        dhcp-171-69-104-.3013  ESTAB

From the above output, the TCP process 02FA62D0 needs to be cleared in order to clear the hung telnet session with the command clear tcp tcb 0x02fa62d0 .

Related Information

Updated: Dec 12, 2008
Document ID: 41100