Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[EX] How to collect necessary logs automatically to troubleshoot high CPU utilization

1

0

Article ID: KB30453 KB Last Updated: 05 Mar 2017Version: 2.0
Summary:

This article explains how to collect necessary logs automatically when CPU utilization reaches a defined threshold value, in order to discover what is causing it.

Symptoms:

When CPU utilization rises unexpectedly, it is difficult to identify what process is causing it. What steps should customers take to diagnose the problem?

Cause:
 
Solution:
  1. Check the MIB value for CPU utilization.
  2. lab@EX4200VC> show snmp mib walk jnxOperatingDescr | match Routing
    jnxOperatingDescr.9.1.0.0 = Routing Engine 0
    jnxOperatingDescr.9.2.0.0 = Routing Engine 1
    

    If FPC0 is the primary and you would like to check CPU utilization for primary only, monitor the MIB value jnxOperatingCPU.9.1.0.0.

  3. Configure Remote Network Monitoring alarm.
  4. The following example will let EX monitor CPU utilization of the primary every 10 seconds to check if it has reached the threshold of 80%.

    set snmp rmon alarm 1 interval 10
    set snmp rmon alarm 1 variable jnxOperatingCPU.9.1.0.0
    set snmp rmon alarm 1 sample-type absolute-value
    set snmp rmon alarm 1 rising-threshold 80
    set snmp rmon alarm 1 rising-event-index 1
    set snmp rmon event 1 type log

    For detailed information on SNMP RMON, please read the following document.

    Configuration Statements: Remote Monitoring (RMON)

  5. Configure Event Policy to collect logs.
  6. This example helps you identify when CPU utilization reaches 80% and which process is busy. Once you know which process made CPU busy, add additional commands in this example for further analysis.

    set event-options policy test events snmpd_rmon_eventlog
    set event-options policy test then execute-commands commands "show system uptime |no-more"
    set event-options policy test then execute-commands commands "show chassis routing-engine |no-more"
    set event-options policy test then execute-commands commands "show system processes extensive |no-more"
    set event-options policy test then execute-commands output-filename CPU-GET-HIGH.txt
    set event-options policy test then execute-commands destination log-for-CPU-GET-HIGH
    set event-options policy test then execute-commands output-format text
    set event-options destinations log-for-CPU-GET-HIGH archive-sites /var/log/

    Please refer to the following document below for more information on configuring Event Policy.

    Configuring Event Policy Actions

  7. Check the collected log file.
  8. You can find a collected log file in defined locations such as the output below.

    lab@EX4200VC> file list /var/log/ | match CPU
    EX4200VC_CPU-GET-HIGH.txt_20150508_190342

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search