I am trying to calculate appropriate sizing data on a linux system for a product and am looking to determine memory usage. The way I am approaching it so far is by running:
cat /proc/<pid>/status
When looking at the output, but I am not sure which figures are relevant. For example:
VmPeak: 19662464 kB VmSize: 18344416 kB VmLck: 0 kB VmHWM: 5942980 kB VmRSS: 4734832 kB VmData: 2108608 kB VmStk: 120 kB VmExe: 9256 kB VmLib: 304448 kB VmPTE: 10316 kB
I would think i would use VmSize (Virtual Memory right?) or VmRSS (Private Memory right?) or some combination to determine this, but I am not sure. Any pointers on correctly calculating the memory usage of a process in Linux?
There are some commands that can help you determine memory usage for a given process:
try pmap or pmap -x
you could also use the old and good top command
vmstat would be useful too.