set cpu-usage threshold

Function

The set cpu-usage threshold command sets the overload threshold and alarm recovery threshold of CPU usage.

By default, the overload threshold value of CPU usage is 90, and the alarm recovery threshold of CPU usage is 75.

Format

set cpu-usage threshold threshold [ restore restore-threshold-value ] [ interval interval-value ] [ slot slot-id ]

undo set cpu-usage threshold [ threshold [ restore [ restore-threshold-value ] ] ] [ interval [ interval-value ] ] [ slot slot-id ]

Parameters

Parameter Description Value
threshold threshold

Sets the overload threshold value of CPU usage. Overload threshold of CPU usage = threshold-value/100.

The value is an integer ranging from 4 to 100. The default value is 90. The default value is recommended.

restore restore-threshold-value

Sets the alarm recovery threshold of CPU usage. Alarm recovery threshold of CPU usage = restore-threshold-value/100.

The value is an integer ranging from 1 to threshold-value minus 3. The default value is 75. The default value is recommended.

interval interval-value

Specifies a detection period.

The value is an integer ranging from 1 to 60, in minutes. The default value is 8 and is recommended.

slot slot-id

Specifies the slot ID of an interface board.

-

Views

System view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
diagnose write

Usage Guidelines

Usage Scenario

A CPU usage threshold is set as required, which helps monitor CPU usage in time.

Configuration Impact

When the CPU usage reaches the overload threshold, the system triggers the SYSTEM_1.3.6.1.4.1.2011.5.25.129.2.4.1 hwCPUUtilizationRisingAlarm alarm.

When the CPU usage decreases to the non-overload threshold, the system triggers the SYSTEM_1.3.6.1.4.1.2011.5.25.129.2.4.2 hwCPUUtilizationResume alarm.

Run

set cpu-usage threshold interval command specifies a detection period, the sampling interval is 10s.

  • If CPU usage sample exceeded the pre-set overload threshold during a sampling cycle, SYSTEM_1.3.6.1.4.1.2011.5.25.129.2.4.1 hwCPUUtilizationRisingAlarm alarm was generated.
  • If CPU usage sample continues to fall below the threshold during a sampling cycle, SYSTEM_1.3.6.1.4.1.2011.5.25.129.2.4.2 hwCPUUtilizationResume alarm was generated.

Precautions

This command is supported only on the admin VS.

  • If the overload threshold value of CPU usage is set too small, the system will frequently trigger alarms.
  • If the overload threshold value of CPU usage is set too large, you cannot obtain information about high CPU usage in time.
  • In a board replacement scenario, if the board types are different before and after the replacement, board configurations are re-reported after the replacement. As a result, original board configurations are lost, and the new board configurations are restored as default configurations.

Example

# Set the CPU usage threshold value to 80 on the main control boards.
<HUAWEI> system-view
[~HUAWEI] set cpu-usage threshold 80
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >