cpup

Command Function

This command is used to query the CPU usage (CPU percent) of the system.

Syntax

cpup [mode] [taskID]

Parameters

Table 1 Parameter description

Parameter

Description

Value Range

mode

  • Default: displays the CPU usage of the system within the last 10 seconds.
  • 0: displays the CPU usage within the last 10 seconds.
  • 1: displays the CPU usage of the system within the last 1 second.
  • Other value: displays the total CPU usage since the system is started.

[0,0xFFFFFFFF]

taskID

Task ID

[0,0xFFFFFFFF]

Usage

  • If the parameters are not specified, the CPU usage within the last 10 seconds is displayed.
  • If only the mode parameter is specified, the CPU usage within the specified period is displayed.
  • If both the mode and taskID parameters are specified, the CPU usage of the specified task within the given period is displayed.

Example

Run cpup 1 5.

Output

Figure 1 CPU usage