monitor cpu-usage

Function

The monitor cpu-usage command dynamically monitors CPU usage and displays CPU usage on at a fixed place of the screen.

The monitor process information command dynamically monitors the usage of system process resources.

Format

display cpu-usage [ slot slotid ]

monitor cpu-usage [ slot slotid ] [ interval intervalValue ]

monitor process information [ slot slotid ] [ interval intervalValue ]

Parameters

Parameter Description Value
slot slotid

Displays the usage of process resources on a specified interface board.

-

interval intervalValue

Specifies the interval at which information about the CPU usage is dynamically displayed.

The value is an integer ranging from 5 to 300, in seconds. The default value is 5.

Views

All views

Default Level

1: Monitoring level

Task Name and Operations

Task Name Operations
diagnose read

Usage Guidelines

Usage Scenario

When a network configuration is changed (for example, system software of network devices is upgraded), you need to monitor CPU usage of the device in real time. At present, the dynamic CPU usage is displayed using the display cpu-usage command repeatedly, which is unable to display the real-time CPU usage and increases the maintenance workload. To reduce the maintenance workload and implement real-time CPU usage, you can run the monitor cpu-usage command.

System process resources include CPU, memory, timer, handle, and thread resources. To monitor the usage of system process resources, run the monitor process information command.

During the dynamic monitoring of information about the usage of system process resources, you can enter the following letters to adjust the display:

  • F: Locks the function to dynamically display information, so that the usage of system process resources is no longer updated.
  • T: Unlocks the function to dynamically display information, so that the usage of system process resources is automatically updated. By default, the function to dynamically display information about the usage of system process resources is unlocked.
  • Q: Exits the process of dynamically displaying the usage of system process resources. You can also press Ctr+C to exit the process. If you do not exit the process, the usage of system process resources keeps being updated.

Implementation Procedure

During the dynamic display of CPU usage, you can enter the following characters to adjust the command output:

  • f: Dynamic entries are locked and CPU usage is no longer updated.
  • t: Dynamic entries are unlocked and CPU usage is updated dynamically. By default, CPU usage is updated dynamically.
  • q: Quits the dynamic display of CPU usage. Alternatively, you can press Ctrl+C. If q is not entered, CPU usage is updated dynamically.

Precautions

  • A user logging in to a device using the console interface cannot use the monitor cpu-usage command to dynamically display CPU usage.
  • During the dynamic display of CPU usage, other commands cannot be run.
  • Dynamic CPU usage is displayed at a fixed place on the screen, and historical information is displayed on the top of the screen.
  • Due to deviations in the interval (at which CPU usage is collected) and the calculation (based on which CPU usage is obtained), and the cost of user task switching, the obtained CPU usage may differ from the actual value. A system task can have a maximum of 10 user tasks and the error of CPU usage of the user task is +-5%.
  • The device to which you log in through the console port does not support the function to dynamically display the usage of system process resources.
  • During the process of dynamically displaying the usage of system process resources, other commands cannot be executed.
  • After the command is executed, information about the usage of system process resources is displayed in real time on the screen, with historical usage information being reserved.

In VS mode, this command is supported only by the admin VS.

Example

# Monitor the usage of process resources on the interface board in real time within 25 seconds.
<HUAWEI> monitor process information slot 1 interval 25
Last time(seconds): 125        Interval(seconds): 25        State: Thaw
ProcessId    ProcessName                CpuUseRate    VmMemorySize(KB)    FDNum   ThreadNum   TimerNum
6            CFG                                5%               5678        10          24         13
10001        PROTO1                             1%               3456        37          17          1
Freeze=f,    Thaw=t,    Quit=q
# Monitor CPU usage of a device in real time.
<HUAWEI> monitor cpu-usage
Last time(seconds): 0        Interval(seconds): 5        State: Thaw
Cpu utilization for five seconds: 34%; one minute: 28%;  five minutes: 28%.
ProcessId    ProcessName                     UseRate    ProcessDescription
2            SM                              2%         System Management               
3            CFG                             2%         Configuration Management        
0            OS                              2%         OS Kernel                       
1001         PROTO2                          2%         IP Stack
Freeze=f,   Thaw=t,   Quit=q
# Display CPU usage on the board, including CPU usage of each task.
<HUAWEI> display cpu-usage
Cpu utilization statistics at 2014-12-15 02:45:21 511 ms
System cpu use rate is : 14%
Cpu utilization for five seconds: 14% ; one minute: 13% ; five minutes: 13%.
Max CPU Usage : 99%
Max CPU Usage Stat. Time : 2014-12-12 10:17:42 109 ms
---------------------------
ServiceName UseRate 
---------------------------
SYSTEM 14%
CMF 0%
NETSTREAM 0%
FEA 0%
OAM 0%
FEC 0%
EUM 0%
LINK 0%
RGM 0%
SLA 0%
TUNNEL 0%
FIBRESM 0%
IFM 0%
TNLM 0%
RM 0%
IP STACK 0%
DEVICE 0%
LOCAL PKT 0%
ARP 0%
DHCP 0%
ND 0%
AAA 0%
---------------------------
CPU Usage Details
----------------------------------------------------------------
CPU Current FiveSec OneMin FiveMin Max MaxTime 
----------------------------------------------------------------
cpu0 20%    20%     22%    18%     99% 2014-12-12 10:17:46
cpu1 13%    14%     14%    9%      99% 2014-12-12 10:17:46
cpu2 13%    13%     16%    12%     99% 2014-12-12 10:17:46
cpu3 15%    14%     10%    11%     99% 2014-12-12 10:17:46
cpu4 12%    13%     12%    9%      99% 2014-12-12 10:17:46
cpu5 13%    13%     11%    18%     99% 2014-12-12 10:17:46
cpu6 13%    13%     11%    8%      99% 2014-12-12 10:17:46
cpu7 14%    14%     9%     19%     99% 2014-12-12 10:17:46
----------------------------------------------------------------
Table 1 Description of the monitor cpu-usage command output
Item Description
Last time(seconds)

Duration for dynamically displaying the usage of system process resources, in seconds.

Last time

Display duration of a dynamic entry.

ProcessId

Name of a task.

ProcessName

Name of a subtask.

CpuUseRate

CPU usage of a process.

VmMemorySize(KB)

Virtual memory size of a process, in KB.

FDNum

Number of file handles opened by the current process.

ThreadNum

Number of threads of the current process.

TimerNum

Total number of timers for the current process.

Cpu utilization statistics at

Date and time when CPU utilization statistics were obtained.

Cpu utilization for five seconds

Average CPU usage in the last 5 seconds, 1 minute, and 5 minutes.

five minutes

Average CPU usage of the last 5 minutes.

one minute

Average CPU usage of the last 1 minute.

UseRate

CPU usage of a user task.

ProcessDescription

Task description.

System cpu use rate is

CPU usage.

Max

Maximum CPU usage.

Max CPU Usage

Maximum CPU usage.

Max CPU Usage Stat. Time

Date and time when the Max CPU Usage event occurred.

CPU Usage Details

Detailed CPU usage.

CPU

CPU type.

ServiceName

Service name.

Current

Current CPU usage.

FiveSec

Average CPU usage in the last 5 seconds.

OneMin

Average CPU usage in the last 1 minute.

FiveMin

Average CPU usage in the last 5 minutes.

MaxTime

Date and time when the Max CPU Usage event occurred.

Interval(seconds)

Interval at which the usage of system process resources is dynamically collected, in seconds.

Interval

Interval at which the dynamic entry of CPU usage is displayed.

State

Status of the existing peer.

  • Freeze: Dynamic entries are locked.
  • Thaw: Dynamic entries are unlocked.
  • Quit: Quits the dynamic display of CPU usage.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >