LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to display how much memory resources consumes an app (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-display-how-much-memory-resources-consumes-an-app-267326/)

guarriman 12-17-2004 03:45 AM

How to display how much memory resources consumes an app
 
Hi.

I would like to display ON THE SHELL how much memory resources consumes an app
(e.g. a script I'm running).

How can I perform it?

Regards.

rjlee 12-17-2004 04:52 AM

Code:

cat /proc/pid/statm
where pid is the process ID of the command you're running (which you can get from top or ps).

The fields are, left-to-right:

size total program size
resident size of memory portions
shared number of pages that are shared
trs number of pages that are 'code'
drs number of pages of data/stack
lrs number of pages of library
dt number of dirty pages


All times are GMT -5. The time now is 05:03 AM.