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
Usage
- If no parameter is specified, the CPU usage of the system within the last 10 seconds is displayed.
- If only mode is specified, the CPU usage within the specified period is displayed.
- If both mode and taskID are specified, the CPU usage of the specified task within the given period is displayed.
Example
Run cpup 1 5.
Output
CPU usage of task 5 in the last one second:
OHOS # cpup 1 5pid 5
CpuUsage in 1s: 0.0