1 lien privé
Check Top Processes sorted by RAM or CPU Usage in Linux
The following command will show the list of top processes ordered by RAM and CPU use in descendant form (remove the pipeline and head if you want to see the full list):
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head
Find Top 15 Processes by Memory Usage with ‘top’ in Batch Mode
To display the top 15 processes sorted by memory use in descending order, do:
top -b -o +%MEM | head -n 22
As opposed to the previous tip, here you have to use +%MEM (note the plus sign) to sort the output in descending order:
Like any other operating system, GNU/Linux has implemented memory management efficiently and even more than that. However, if any process is eating away your memory and you want to clear it, Linux provides a way to flush or clear the RAM cache.