How to see top processes sorted by actual memory usage?

前端 未结 12 957
栀梦
栀梦 2020-12-07 06:53

I have a server with 12G of memory. A fragment of top is shown below:

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                              


        
12条回答
  •  不思量自难忘°
    2020-12-07 07:07

    use quick tip using top command in linux/unix

    $ top
    

    and then hit Shift+m (i.e. write a capital M).

    From man top

    SORTING of task window
      For compatibility, this top supports most of the former top sort keys.
      Since this is primarily a service to former top users, these commands do
      not appear on any help screen.
        command   sorted-field                  supported
          A         start time (non-display)      No
          M         %MEM                          Yes
          N         PID                           Yes
          P         %CPU                          Yes
          T         TIME+                         Yes
    

    Or alternatively: hit Shift + f , then choose the display to order by memory usage by hitting key n then press Enter. You will see active process ordered by memory usage

提交回复
热议问题