How can I measure the actual memory usage of an application or process?

后端 未结 30 2683
心在旅途
心在旅途 2020-11-22 03:01

This question is covered here in great detail.

How do you measure the memory usage of an application or process in Linux?

From the blog articl

30条回答
  •  情深已故
    2020-11-22 03:54

    I am using Arch Linux and there's this wonderful package called ps_mem:

    ps_mem -p 
    

    Example Output

    $ ps_mem -S -p $(pgrep firefox)
    
    Private   +   Shared  =  RAM used   Swap used   Program
    
    355.0 MiB +  38.7 MiB = 393.7 MiB    35.9 MiB   firefox
    ---------------------------------------------
                            393.7 MiB    35.9 MiB
    =============================================
    

提交回复
热议问题