If you are having trouble finding the information of a process consuming the highest memory and CPU usage on the Raspberry Pi system, follow this guide to learn about different commands for this task.
Finding Top Processes by Memory and CPU Usage in Raspberry Pi
The commands to find the top running process are mentioned below, go through each of them one by one and choose your best fit:
Command 1
The first command on our list is the ps aux command which displays the overall process report with PID (Process Identification) number, memory usage, CPU usage and other important details:
Command 2
If you are not interested in all the details and you only want to display the top most processes that are consuming memory and CPU then you can use the below-mentioned command to get a straight forward output with only memory and CPU usage amount:
Command 3
Lastly, if you want to display the processes in such a way that they are sorted on the basis of memory usage then run the below-written command:
You can also do the same for CPU usage too, just replace %mem with %cpu in the above command:
Conclusion
There are three commands which can be used to display the top running processes based on highest memory and CPU usage. The syntax and purpose of each are discussed in the above-mentioned guidelines; Users can opt for any of these.