With the terminal: Show the 10 processes that consume the most memory

Reading my RSS i came across this interesting tip that will show us the 10 processes that consume the most in our system. We open a terminal and put:

ps aux --width 30 --sort -rss | head

And we will result in something like this:


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

12 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   e2391 said

    Thank you very much for linking my post 🙂

    As Hugo says, htop is much more complete in terms of functions. I use it too much, it is one of those applications that are never missing from my systems.

    But, when I just want to have a quick look, I use that command. On the other hand, you can also filter the information to be displayed and the criteria by which the results are ordered. It is only a matter of reading the ps man 🙂 From then on each one arms the alias as they want 🙂

    Regards!

  2.   Hugo said

    Well, it is one way to do it, although I prefer to use htop, which allows you to easily explore the list of processes, in addition to making it easier to select the columns to be displayed, and the ordering of the results not only by memory consumption, but also by other criteria. Oh, and from the same tool you can end a process, change its priority levels, etc.

    1.    elav <° Linux said

      Yes, of course, it is clear that Htop is much more complete, but sometimes it confuses me, because it shows me the same process more than once, I don't know if you understand me 😀

      1.    Hugo said

        You can customize it. If you access the Setup (F2) and you go to the section that says Display options, you can either check the option Display threads in a different color, or mark Hide kernel threads I Hide userland threads.

  3.   Thirteen said

    Like Hugo, I usually use "htop" to get that information from the system. but it is always good to know alternatives. The contribution is appreciated.

    The disadvantage of this alternative is that it is a difficult command to remember. Although I suppose that "ps" has other possibilities and advantages for those who are familiar with it.

    Greetings.

  4.   alunado said

    «The process that consumes the most memory is forgetting», and I have a friend who discusses me and tells me that it is not like that, that what consumes our memory the most is capitalism and marketing ... and I answer that they produce forgetfulness . We are always arguing, but we both use Htop.

    1.    Thirteen said

      "The process that consumes the most memory is forgetting"

      What a precise and symbolic statement.

  5.   Near said

    ok ... I understand that everyone has a system that gives them very good results from their point of view ... and it sounds a bit like everyone from their religion wants to be right ... my case is ... I'm new to linux and I have ubuntu 12.4 yes? which to my way of seeing is very similar to windows .. it is understood that I am migrating from one system to another, right? My search for today is that .. it is very slow and I would like to know how to speed it up, I also understand that because of the little machine I have it should be quite agile, but nothing… I hope you can help me in advance, thank you very much

  6.   Omar said

    what is process 0 in linux and process 1?

  7.   Jeisson said

    Good Morning,

    Does anyone know why some processes displayed by the command ps aux –width 30 –sort -rss | head appear with a (LOCAL = NO) at the end.

    Thank you.

  8.   Tom sheaiker said

    Sign up! Here are three more methods:

    1) ps aux –sort pmem
    2) ps aux | awk '{print $ 2, $ 4, $ 11}' | sort -k2r | head -n 15
    3) top -a

    Source: http://www.sysadmit.com/2016/05/linux-uso-de-memoria-por-proceso.html