12-Network Management and Monitoring Configuration Guide

HomeSupportSwitchesH3C S12500 Switch SeriesConfigure & DeployConfiguration GuidesH3C S12500 Configuration Guide-Release7128-6W71012-Network Management and Monitoring Configuration Guide
07-Process monitoring and maintenance configuration

Monitoring and maintaining processes

H3C Comware V7 is a full-featured, modular, and scalable network operating system based on the Linux kernel. Comware V7 software features run independent processes that fall into the following types:

·           User process—Runs in user space. Most Comware V7 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. You can also manually start, crash, stop, or restart a user process. Comware V7 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, but you cannot start, crash, stop, or restart kernel threads.

Displaying and maintaining processes

Commands described in this section apply to both user processes and kernel threads. You can execute these commands in any view.

The system identifies a process that consumes excessive memory or CPU resources as an anomaly source.

In standalone mode

 

Task

Command

Display memory usage.

display memory [ slot slot-number ]

Display process state information.

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

Display CPU usage for all processes.

display process cpu [ slot slot-number ]

Monitor process running state.

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

Monitor thread running state.

monitor thread [ dumbtty ] [ iteration number ]

 

For detailed information about the display memory [ slot slot-number ] command, see Fundamentals Command Reference.

In IRF mode

 

Task

Command

Display memory usage.

display memory [ chassis chassis-number slot slot-number ]

Display process state information.

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

Display CPU usage for all processes.

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

Monitor process running state.

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

Monitor thread running state.

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

 

For detailed information about the display memory [ chassis chassis-number slot slot-number ] command, see Fundamentals Command Reference.

Displaying and maintaining user processes

Execute display commands in any view.

In standalone mode

 

Task

Command

Display log information for all user processes.

display process log [ slot slot-number ]

Display memory usage for all user processes.

display process memory [ slot slot-number ]

Display heap memory usage for a user process.

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

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

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

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

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

 

In IRF mode

 

Task

Command

Display log information for all user processes.

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

Display memory usage for all user processes.

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

Display heap memory usage for a user process.

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

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

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

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

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

 

Monitoring kernel threads

Tasks in this section help you quickly identify thread deadloop and starvation problems and their causes.

Configuring kernel thread deadloop detection

 

CAUTION

CAUTION:

Inappropriate configuration of kernel thread deadloop detection can cause service problems or system breakdown. Make sure you understand the impact of this configuration on your network before you do it.

 

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 interval, the device considers that a deadloop has occurred. It generates a deadloop message and reboots to remove the deadloop.

In standalone mode

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

1.     Enable kernel thread deadloop detection.

monitor kernel deadloop enable [ slot slot-number ]

By default, the function is enabled.

2.     (Optional.) Set the interval for identifying a kernel thread deadloop.

monitor kernel deadloop time interval [ slot slot-number ]

The default is 8 seconds.

3.     (Optional.) Disable kernel thread deadloop detection for a kernel thread.

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

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

 

In IRF mode

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable kernel thread deadloop detection.

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

By default, the function is enabled.

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

monitor kernel deadloop time interval [ chassis chassis-number slot slot-number ]

The default is 8 seconds.

4.     (Optional.) Disable kernel thread deadloop detection for a kernel thread.

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

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

 

Configuring kernel thread starvation detection

 

CAUTION

CAUTION:

Inappropriate configuration of kernel thread starvation detection can cause service problems or system breakdown. Make sure you understand the impact of this configuration on your network before you do it.

 

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 interval, the system considers 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.

In standalone mode

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable kernel thread starvation detection.

monitor kernel starvation enable [ slot slot-number ]

By default, the function is disabled.

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

monitor kernel starvation time interval [ slot slot-number ]

The default is 120 seconds.

4.     (Optional.) Disable kernel thread starvation detection for a kernel thread.

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

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

 

In IRF mode

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable kernel thread starvation detection.

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

By default, the function is disabled.

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

monitor kernel starvation time interval [ chassis chassis-number slot slot-number ]

The default is 120 seconds.

4.     (Optional.) Disable kernel thread starvation detection for a kernel thread.

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

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

 

Displaying and maintaining kernel threads

In standalone mode

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

 

Task

Command

Display kernel thread deadloop information.

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

Display kernel thread deadloop detection configuration.

display kernel deadloop configuration [ slot slot-number ]

Display kernel thread exception information.

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

Display kernel thread reboot information.

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

Display kernel thread starvation information.

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

Display kernel thread starvation detection configuration.

display kernel starvation configuration [ slot slot-number ]

Clear kernel thread deadloop information.

reset kernel deadloop [ slot slot-number ]

Clear kernel thread exception information.

reset kernel exception [ slot slot-number ]

Clear kernel thread reboot information.

reset kernel reboot [ slot slot-number ]

Clear kernel thread starvation information.

reset kernel starvation [ slot slot-number ]

 

In IRF mode

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

 

Task

Command

Display kernel thread deadloop information.

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

Display kernel thread deadloop detection configuration.

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

Display kernel thread exception information.

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

Display kernel thread reboot information.

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

Display kernel thread starvation information.

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

Display kernel thread starvation detection configuration.

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

Clear kernel thread deadloop information.

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

Clear kernel thread exception information.

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

Clear kernel thread reboot information.

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

Clear kernel thread starvation information.

reset kernel starvation [ chassis chassis-number slot slot-number ]

 

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