1e41f4b71Sopenharmony_ci# cpup
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci## Command Function
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ciThis command is used to query the CPU percent (CPUP) of the system.
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci## Syntax
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_cicpup [_mode_] [_taskID_]
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci## Parameters
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci**Table 1** Parameter description
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ci| Parameter| Description| Value Range|
19e41f4b71Sopenharmony_ci| -------- | -------- | -------- |
20e41f4b71Sopenharmony_ci| mode | Displays the CPUP of the system within the last 10 seconds by default.<br>- **0**: displays the CPUP within the last 10 seconds.<br>- **1**: displays the CPUP within the last 1 second.<br>- Other numbers: display the total CPUP since the system starts.| [0, 0xFFFFFFFF] |
21e41f4b71Sopenharmony_ci| taskID | Specifies the task ID.| [0, 0xFFFFFFFF] |
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ci
24e41f4b71Sopenharmony_ci## Usage Guidelines
25e41f4b71Sopenharmony_ci
26e41f4b71Sopenharmony_ci- If no parameter is specified, the CPU usage of the system within the last 10 seconds is displayed.
27e41f4b71Sopenharmony_ci
28e41f4b71Sopenharmony_ci- If only **mode** is specified, the CPU usage within the specified period is displayed.
29e41f4b71Sopenharmony_ci
30e41f4b71Sopenharmony_ci- If both **mode** and **taskID** are specified, the CPU usage of the specified task within the given period is displayed.
31e41f4b71Sopenharmony_ci
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ci## Example
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ciRun **cpup 1 5**.
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ci
38e41f4b71Sopenharmony_ci## Output
39e41f4b71Sopenharmony_ci
40e41f4b71Sopenharmony_ciCPU usage of task 5 in the last one second:
41e41f4b71Sopenharmony_ci
42e41f4b71Sopenharmony_ci```
43e41f4b71Sopenharmony_ciOHOS # cpup 1 5pid 5 
44e41f4b71Sopenharmony_ci
45e41f4b71Sopenharmony_ciCpuUsage in 1s: 0.0
46e41f4b71Sopenharmony_ci```
47