Configuring kernel thread deadloop detection


[CAUTION: ]

CAUTION:

As a best practice, use the default settings. 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 configure kernel thread deadloop detection.


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 and takes the specified deadloop protection action.

To configure kernel thread deadloop detection:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enable kernel thread deadloop detection.

monitor kernel deadloop enable [ slot slot-number [ cpu cpu-number [ core core-number&<1-64> ] ] ]

By default, kernel thread deadloop detection is enabled.

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

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

The default is 20 seconds.

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

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

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

5. (Optional.) Specify the action to be taken in response to a kernel thread deadloop.

monitor kernel deadloop action { reboot | record-only } [ slot slot-number [ cpu cpu-number ] ]

By default, the kernel thread deadloop protection action is to log the event.