pmap in Linux

Oct 17, 2004 2 Replies

Hello,



I'd like to measure the amount of RAM required by a single process, but it turned to be a non-trivial task because of demand paging, dynamic libraries and fork() usage.



In Solaris it's pretty easy to get what I want using pmap. It shows the whole application virtual memory and, amongst other things, the RSS for each region/area.



Unfortunately, this feature has not been implemented in the Linux pmap port as it just lists region attributes and size, probably because the info I look for cannot be gathered directly from the /proc dir.



Any hint about this?



Thanks


Not that this would help you finding a value but there is much more to this:

At a given point of time, maximum on this run, maximum ever possible, average, minimum, or .... ?

(Minimum usually is 0 as the process can be swapped out completely).

BTW.: The value also depends on the system. E.g. with a non compressed RAM file system Linux can "load" a process without allocating any additional RAM for the code pages, as the code already is in RAM.

-Michael

Right. Those are my final goals. But how could I calculate their values if I don't know how to get the instantaneous RAM usage?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required