Measure memory usage of Linux application or process

1137015 pts.
Tags:
Linux
I apologize if this is a 'newbie' questions but how can I measure the memory usage of either an application or process in Linux? A friend of mine told me to use PS but I'm not sure if that will work. Thank you.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

The basic ps command in Linux provides a display of all processes running on the system, including user IDs, CPU usage, memory usage percentage, etc. This information is accessed using the following steps:

    1. Browse the selection of programs and launch the resident terminal manager program to access the Linux shell.
    2. At the terminal manager command line, type the following:
      $ ps aux
      $ ps -ef -f

 

To identify processes that are consuming large amounts of memory, the sort command is used. Multiple fields are separated with a comma, and each field can be preceded with a “-” or “+” to sort the list in ascending or descending order. For demonstration, the following command also includes the CPU usage field:
$ ps aux –sort=+pmem,-pcpu

There are multitudes of other ways the ps command can dig for data, but these commands will help you quickly identify memory usage in linux applications and processes.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: