Processes & CPU
Android 1.0+
Risk: READ_ONLY
Real-Time Process Monitor (top)
Displays real-time Linux processes, CPU percentage, thread count, RSS memory, and priority.
Command Syntax
adb shell top
Generic Syntax:
top [-m <MAX>] [-n <ITERATIONS>] [-d <DELAY>] [-s <SORT>] [-H]
Options & Parameters
| Flag | Description |
|---|---|
| -m <N> | Maximum number of processes to display |
| -n <N> | Exit after N iterations |
| -H | Show threads instead of processes |
Real-World Usage Examples
Top 5 processes by CPU
Prints snapshot of top 5 processes
adb shell top -m 5 -n 1
Output:
PID USER PR NI CPU% S #THR VSS RSS PCY Name
1820 system -2 0 12% S 142 124800K 94200K fg com.android.systemui
1420 system 18 -2 8% S 184 210400K 122400K fg system_server