

The cookies is used to store the user consent for the cookies in the category "Necessary". This cookie is set by GDPR Cookie Consent plugin. The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". The cookie is used to store the user consent for the cookies in the category "Analytics". These cookies ensure basic functionalities and security features of the website, anonymously. Necessary cookies are absolutely essential for the website to function properly. If you have any questions or feedback, let us know in the comments below! Tags linux memory usage, Linux Tips & Tricks, top command examples Post navigation Make sure you check out the manual page of the top using ‘ man top‘ to learn more about the command. In this article, we have seen how to find the top running processes by memory usage in Linux, using the top command-line utility. The user should thus enter the number as ‘ required processes to see’ plus 7.įor example, If the top 15 processes are to be seen, he should pass the argument as 22.

Note that the summary of resource usage is displayed at the beginning hence 7 rows of those are considered by ‘ head‘ and we can see 8 processes in the output. $ top -o %MEM | head -n 15įind Top 10 Linux Processes Using Highest Memory To get the top 5 or top 10 largest memory consuming processes from this output, we can simply pipe the output to command ‘ head‘, which will display only the first ‘n’ rows of any output. Find Top 10 Processes Using Highest Memory Usage if there is a change in memory or resource usage for any program, the output will immediately show the changed values in the interactive output. The output of the top command is real-time i.e. To show the most memory consuming processes, we make use of the '-o' flag at the top to sort the output. Find Processes Using Highest Memory Usage The column '%MEM' is showing the memory usage of each program. Note that it shows the output in an interactive format and not simply print the output. When executed without any argument, top shows all the Linux processes by their CPU usage, shared and private memory usage, etc. We will use the top command-line utility, which is a task manager in Unix and Linux systems that shows all the details about running processes. This gives an idea of the system resource usage and the user can then take appropriate action to free up the memory. Not only for servers but also for regular desktop usage, it is quite handy to know the processes and programs which are consuming the most memory. System administrators and even advanced users of Linux have a good deal of knowledge of the command line and know specific commands or specific arguments to certain commands, to get the job in hand done. Linux is the top choice of an operating system when it comes to server-based systems.
