
The top command in Linux is used to view current processes, CPU, memory, and other information.
1. Filter by user
<span>top</span> and then press <span>u</span>, and enter the username you want to view.
2. Filter by command
<span>top</span> and then press <span>o</span>, enter <span>COMMAND=xxx</span> to display only the xxx program.
<span>top</span> and then press <span>o</span>, enter <span>%CPU>2.0</span> to display only processes with CPU usage greater than 2%.
3. Cancel filtering
Press <span>=</span> to cancel all filters.
4. Sort by memory size
<span>top</span> and then press <span>M</span>.
5. Sort by CPU usage
<span>top</span> and then press <span>P</span>.
6. Display detailed information about COMMAND
<span>top</span> and then press <span>c</span> to display detailed information about COMMAND.
7. More configurations for top can be set by pressing <span>f</span>, such as hiding or showing certain columns.

END
Author: Niu Xiaoma
Source: ExASICCopyright belongs to the original author. If there is any infringement, please contact for removal..▍Recommended ReadingWhy is C++ rarely used in microcontroller development?Xiaomi is really stingy; one MCU actually handles all functions.Uploaded a PCB photo with only 2 lines of silk screen, and GPT-5 helped me solve everything!→ Follow for more updates ←