18-Network Management and Monitoring Configuration Guide

HomeSupportConfigure & DeployConfiguration GuidesH3C Access Controllers Configuration Guides(R5426P02)-6W10418-Network Management and Monitoring Configuration Guide
08-Process monitoring and maintenance configuration

Monitoring and maintaining processes

About monitoring and maintaining processes

The system software of the device is a full-featured, modular, and scalable network operating system based on the Linux kernel. The system software features run the following types of independent processes:

·     User process—Runs in user space. Most system software features run user processes. Each process runs in an independent space so the failure of a process does not affect other processes. The system automatically monitors user processes. The system supports preemptive multithreading. A process can run multiple threads to support multiple activities. Whether a process supports multithreading depends on the software implementation.

·     Kernel thread—Runs in kernel space. A kernel thread executes kernel code. It has a higher security level than a user process. If a kernel thread fails, the system breaks down. You can monitor the running status of kernel threads.

Restrictions: Command and hardware compatibility

The WX1800H series, WX2500H series, and WX3000H series access controllers do not support parameters or commands that are available only in IRF mode.

Process monitoring and maintenance tasks at a glance

To monitor and maintain processes, perform the following tasks:

·     Monitoring and maintaining user processes

¡     Monitoring and maintaining processes

The commands in this section apply to both user processes and kernel threads.

¡     Monitoring and maintaining user processes

The commands in this section apply only to user processes.

·     Monitoring and maintaining kernel threads

¡     Monitoring and maintaining processes

The commands in this section apply to both user processes and kernel threads.

¡     Monitoring and maintaining kernel threads

The commands in this section apply only to kernel threads.

Monitoring and maintaining processes

About this task

The commands in this section apply to both user processes and kernel threads. You can use the commands for the following purposes:

·     Display the overall memory usage.

·     Display the running processes and their memory and CPU usage.

·     Locate abnormal processes.

If a process consumes excessive memory or CPU resources, the system identifies the process as an abnormal process.

·     If an abnormal process is a user process, troubleshoot the process as described in "Monitoring and maintaining user processes."

·     If an abnormal process is a kernel thread, troubleshoot the process as described in "Monitoring and maintaining kernel threads."

Procedure

Execute the following commands in any view.

 

Task

Command

Display memory usage.

(For more information about this command, see System Management Command Reference.)

In standalone mode:

display memory [ summary ]

In IRF mode:

display memory [ summary ] [ slot slot-number [ cpu cpu-number ] ]

Display process state information.

In standalone mode:

display process [ all | job job-id | name process-name ]

In IRF mode:

display process [ all | job job-id | name process-name ] [ slot slot-number [ cpu cpu-number ] ]

Display CPU usage for all processes.

In standalone mode:

display process cpu

In IRF mode:

display process cpu [ slot slot-number [ cpu cpu-number ] ]

Monitor process running state.

In standalone mode:

monitor process [ dumbtty ] [ iteration number ]

In IRF mode:

monitor process [ dumbtty ] [ iteration number ] [ slot slot-number [ cpu cpu-number ] ]

Monitor thread running state.

In standalone mode:

monitor thread [ dumbtty ] [ iteration number ]

In IRF mode:

monitor thread [ dumbtty ] [ iteration number ] [ slot slot-number [ cpu cpu-number ] ]

Monitoring and maintaining user processes

About monitoring and maintaining user processes

Use this feature to monitor abnormal user processes and locate problems.

Configuring core dump

About this task

The core dump feature enables the system to generate a core dump file each time a process crashes until the maximum number of core dump files is reached. A core dump file stores information about the process. You can send the core dump files to H3C Support to troubleshoot the problems.

Restrictions and guidelines

Core dump files consume storage resources. Enable core dump only for processes that might have problems.

Procedure

Execute the following commands in user view:

1.     (Optional.) Specify the directory for saving core dump files.

exception filepath directory

The directory for saving core dump files is the root directory of the default file system. For more information about the default file system, see file system management in Fundamentals Configuration Guide.

2.     Enable core dump for a process and specify the maximum number of core dump files, or disable core dump for a process.

process core { maxcore value | off } { job job-id | name process-name }

By default, a process generates a core dump file for the first exception and does not generate any core dump files for subsequent exceptions.

Display and maintenance commands for user processes

Execute display commands in any view and other commands in user view.

 

Task

Command

Display context information for process exceptions.

In standalone mode:

display exception context [ count value ]

In IRF mode:

display exception context [ count value ] [ slot slot-number [ cpu cpu-number ] ]

Display the core dump file directory.

In standalone mode:

display exception filepath

 

display exception filepath [ slot slot-number [ cpu cpu-number ] ]

Display log information for all user processes.

In standalone mode:

display process log

In IRF mode:

display process log [ slot slot-number [ cpu cpu-number ] ]

Display memory usage for all user processes.

In standalone mode:

display process memory

In IRF mode:

display process memory [ slot slot-number [ cpu cpu-number ] ]

Display heap memory usage for a user process.

In standalone mode:

display process memory heap job job-id [ verbose ]

In IRF mode:

display process memory heap job job-id [ verbose ] [ slot slot-number [ cpu cpu-number ] ]

Display memory content starting from a specified memory block for a user process.

In standalone mode:

display process memory heap job job-id address starting-address length memory-length

In IRF mode:

display process memory heap job job-id address starting-address length memory-length [ slot slot-number [ cpu cpu-number ] ]

Display the addresses of memory blocks with a specified size used by a user process.

In standalone mode:

display process memory heap job job-id size memory-size [ offset offset-size ]

In IRF mode:

display process memory heap job job-id size memory-size [ offset offset-size ] [ slot slot-number [ cpu cpu-number ] ]

Clear context information for process exceptions.

In standalone mode:

reset exception context

In IRF mode:

reset exception context [ slot slot-number [ cpu cpu-number ] ]

Monitoring and maintaining kernel threads

Configuring kernel thread deadloop detection

About this task

Kernel threads share resources. If a kernel thread monopolizes the CPU, other threads cannot run, resulting in a deadloop.

This feature enables the device to detect deadloops. If a thread occupies the CPU for a specific period of time, the device considers that a deadloop has occurred. It generates a deadloop message and reboots to remove the deadloop.

Restrictions and guidelines

Change kernel thread deadloop detection settings only under the guidance of H3C Support. Inappropriate configuration can cause system breakdown.

Procedure

1.     Enter system view.

system-view

2.     Enable kernel thread deadloop detection.

In standalone mode:

monitor kernel deadloop enable

In IRF mode:

monitor kernel deadloop enable [ slot slot-number [ cpu cpu-number ] ]

By default, kernel thread deadloop detection is enabled.

3.     (Optional.) Set the threshold for identifying a kernel thread deadloop.

In standalone mode:

monitor kernel deadloop time time

In IRF mode:

monitor kernel deadloop time time [ slot slot-number [ cpu cpu-number ] ]

By default, the threshold for identifying a kernel thread deadloop is 20 seconds.

4.     (Optional.) Exclude a kernel thread from kernel thread deadloop detection.

In standalone mode:

monitor kernel deadloop exclude-thread tid

In IRF mode:

monitor kernel deadloop exclude-thread tid [ slot slot-number [ cpu cpu-number ] ]

When enabled, kernel thread deadloop detection monitors all kernel threads by default.

Configuring kernel thread starvation detection

About this task

Starvation occurs when a thread is unable to access shared resources.

Kernel thread starvation detection enables the system to detect and report thread starvation. If a thread is not executed within a specific period of time, the system determines that a starvation has occurred and generates a starvation message.

Thread starvation does not impact system operation. A starved thread can automatically run when certain conditions are met.

Restrictions and guidelines

Configure kernel thread starvation detection only under the guidance of H3C Support. Inappropriate configuration can cause system breakdown.

Procedure

1.     Enter system view.

system-view

2.     Enable kernel thread starvation detection.

In standalone mode:

monitor kernel starvation enable

In IRF mode:

monitor kernel starvation enable [ slot slot-number [ cpu cpu-number ] ]

By default, kernel thread starvation detection is disabled.

3.     (Optional.) Set the threshold for identifying a kernel thread starvation.

In standalone mode:

monitor kernel starvation time time

In IRF mode:

monitor kernel starvation time time [ slot slot-number [ cpu cpu-number ] ]

By default, the threshold for identifying a kernel thread starvation is 120 seconds.

4.     (Optional.) Exclude a kernel thread from kernel thread starvation detection.

In standalone mode:

monitor kernel starvation exclude-thread tid

In IRF mode:

monitor kernel starvation exclude-thread tid [ slot slot-number [ cpu cpu-number ] ]

When enabled, kernel thread starvation detection monitors all kernel threads by default.

Display and maintenance commands for kernel threads

Execute display commands in any view and reset commands in user view.

 

Task

Command

Display kernel thread deadloop detection configuration.

In standalone mode:

display kernel deadloop configuration

In IRF mode:

display kernel deadloop configuration [ slot slot-number [ cpu cpu-number ] ]

Display kernel thread deadloop information.

In standalone mode:

display kernel deadloop show-number [ offset ] [ verbose ]

In IRF mode:

display kernel deadloop show-number [ offset ] [ verbose ] [ slot slot-number [ cpu cpu-number ] ]

Display kernel thread exception information.

In standalone mode:

display kernel exception show-number [ offset ] [ verbose ]

In IRF mode:

display kernel exception show-number [ offset ] [ verbose ] [ slot slot-number [ cpu cpu-number ] ]

Display kernel thread reboot information.

In standalone mode:

display kernel reboot show-number [ offset ] [ verbose ]

In IRF mode:

display kernel reboot show-number [ offset ] [ verbose ] [ slot slot-number [ cpu cpu-number ] ]

Display kernel thread starvation detection configuration.

In standalone mode:

display kernel starvation configuration

In IRF mode:

display kernel starvation configuration [ slot slot-number [ cpu cpu-number ] ]

Display kernel thread starvation information.

In standalone mode:

display kernel starvation show-number [ offset ] [ verbose ]

In IRF mode:

display kernel starvation show-number [ offset ] [ verbose ] [ slot slot-number [ cpu cpu-number ] ]

Clear kernel thread deadloop information.

In standalone mode:

reset kernel deadloop

In IRF mode:

reset kernel deadloop [ slot slot-number [ cpu cpu-number ] ]

Clear kernel thread exception information.

In standalone mode:

reset kernel exception

In IRF mode:

reset kernel exception [ slot slot-number [ cpu cpu-number ] ]

Clear kernel thread reboot information.

In standalone mode:

reset kernel reboot

In IRF mode:

reset kernel reboot [ slot slot-number [ cpu cpu-number ] ]

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网