1# top 2 3 4## Command Function 5 6This command is used to query process and thread information. 7 8 9## Syntax 10 11top [_-a_] 12 13 14## Parameters 15 16**Table 1** Parameter description 17 18| Parameter | Description | 19| ------ | --------------------------- | 20| --help | Displays the parameters supported by the **top** command.| 21| -a | Displays detailed information. | 22 23 24## Usage Guidelines 25 26If no parameter is specified, partial task information is displayed by default. 27 28## Note 29 30Currently, the shell does not support this command. mksh supports it. To switch to mksh, run **cd bin** and **./mksh**. 31 32## Example 33 34Run **top**. 35 36 37## Output 38 39Command output 40 41``` 42OHOS:/$ top 43 allCpu(%): 4.68 sys, 195.32 idle 44 PID PPID PGID UID Status VirtualMem ShareMem PhysicalMem CPUUSE10s PName 45 1 -1 1 0 Pending 0x33b000 0xbb000 0x4e01c 0.0 init 46 2 -1 2 0 Pending 0xd838c0 0 0xd838c0 1.16 KProcess 47 3 1 3 7 Pending 0x72e000 0x1a3000 0x1d29dc 0.0 foundation 48 4 1 4 8 Pending 0x362000 0xbb000 0x5cc19 0.0 bundle_daemon 49 5 1 5 1 Pending 0xdfa000 0x2e7000 0x148a0a 0.0 appspawn 50 6 1 6 0 Pending 0x688000 0x137000 0x11c1ba 0.0 media_server 51 7 1 7 0 Pending 0x9d2000 0x103000 0xa21f9 0.87 wms_server 52 8 1 8 2 Pending 0x1f5000 0x48000 0x462dc 0.0 mksh 53 11 1 11 0 Pending 0x4d4000 0x112000 0xe0d9c 0.0 deviceauth_service 54 12 1 12 0 Pending 0x34f000 0xbd000 0x51cb3 0.0 sensor_service 55 13 1 13 2 Pending 0x34e000 0xb3000 0x5269e 0.0 ai_server 56 14 1 14 0 Pending 0x61f000 0x13b000 0x16858b 0.45 softbus_server 57 43 8 43 2 Running 0x1d7000 0x3a000 0x1e9f5 0.0 toybox 58 TID PID Affi CPU Status StackSize WaterLine CPUUSE10s MEMUSE TaskName 59 23 1 0x3 -1 Pending 0x3000 0xcf4 0.0 0 init 60 1 2 0x1 -1 Pending 0x4000 0x2c4 0.33 0 Swt_Task 61 2 2 0x3 -1 Pending 0x4000 0x204 0.0 0 system_wq 62 3 2 0x2 -1 Pending 0x4000 0x514 0.75 0 Swt_Task 63 4 2 0x3 -1 Pending 0x1000 0x3ac 0.0 0 ResourcesTask 64 7 2 0x3 -1 Pending 0x4e20 0xa5c 0.0 0 PlatformWorkerThread 65 8 2 0x3 -1 Pending 0x4e20 0xa6c 0.0 0 PlatformWorkerThread 66 9 2 0x3 -1 Pending 0x4e20 0xbf4 0.0 0 PlatformWorkerThread 67 10 2 0x3 -1 Pending 0x3000 0x4dc 0.0 0 bcache_async_task 68 11 2 0x3 -1 PendTime 0x4000 0x3e4 0.5 0 hi_vdec_thread 69 12 2 0x3 -1 Pending 0x2710 0x224 0.0 0 LiteOS usb pnp notify handle kt 70 13 2 0x3 -1 Pending 0x3000 0x37c 0.0 0 bcache_async_task 71 14 2 0x3 -1 Pending 0x4000 0x204 0.0 0 vibrator_queue 72 15 2 0x3 -1 Pending 0x20000 0x35c 0.0 0 eth_irq_Task 73 16 2 0x3 -1 PendTime 0x2000 0x354 0.0 0 MessageDispatcher 74 18 2 0x3 -1 Pending 0x2710 0x200 0.0 0 GPIO_IRQ_TSK_0_4 75 19 2 0x3 -1 Pending 0x4000 0x204 0.0 0 dispWQ 76 20 2 0x3 -1 Pending 0x4000 0x204 0.0 0 hdf_sensor_test_work_queue 77 21 2 0x3 -1 PendTime 0x6000 0x40c 0.2 0 tcpip_thread 78 22 2 0x3 -1 Pending 0x4000 0x36c 0.0 0 SendToSer 79 61 2 0x3 -1 Pending 0x4000 0x244 0.0 0 USB_GIANT_Task 80 63 2 0x3 -1 Pending 0x4000 0x244 0.0 0 USB_NGIAN_ISOC_Task 81 64 2 0x3 -1 Pending 0x4000 0x244 0.0 0 USB_NGIAN_BULK_TasK 82``` 83 84**Table 2** Output description 85 86| Parameter | Description | 87| --------- | ----------------- | 88| PID | Process ID. | 89| PPID | Parent process ID. | 90| PGID | Process group ID. | 91| UID | User ID. | 92| Status | Current task status. | 93| CPUUSE10s | CPU usage within last 10 seconds.| 94| PName | Name of the process. | 95| TID | Task ID. | 96| StackSize | Size of the task stack. | 97| WaterLine | Peak value of the stack used. | 98| MEMUSE | Memory usage. | 99| TaskName | Task name. | 100