pmap in Linux

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

Reply to
Legrandin
Loading thread data ...

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

Reply to
Michael Schnell

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?

Reply to
Legrandin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.