2

I have a docker container running a base image of alpine linux and when I exec into the docker container and run the command:

pmap -x [pid]

The headers that I see in the output are:

Address Kbytes PSS Dirty Swap Mode Mapping

I am actually explicitly looking for RSS (Resident Set Size). Why is this header not showing up in the output?

sunsin1985
  • 2,437
  • 5
  • 22
  • 27
  • 1
    Please note that Stackoverflow is for programming related questions only. Please review the [help/on-topic] for what topics can be asked here. This question may be appropriate on other SE sites such as [unix.se] or [superuser](http://superuser.com). Check their help first to see if the question belongs there and if so you can click the "flag" link to request migration there. – kaylum Jul 27 '16 at 22:48

1 Answers1

0

If pmap does not display it in that particular docker image (Alpine), check if top if more complete in its output (as in this thread):

vagrant@dockerdev:/host/scratch/janus-gateway$ sudo docker run --name=mc_small --detach --publish=11213:11211 --user=nobody ploxiln/memcached /bin/memcached -v -m 64 -c 1024
  11037b69acfbc0de7601831634751cd342a7bafe9a25749285bc2c2803cc1768
  vagrant@dockerdev:/host/scratch/janus-gateway$ top c -b -n1 | grep 'COMMAND\|memcached'
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
   5984 nobody    20   0  316960   1192    768 S   0.0  0.1   0:00.02 /usr/bin/memcached -v -m 64 -c 1024
   6091 nobody    20   0  305256    780    412 S   0.0  0.0   0:00.00 /bin/memcached -v -m 64 -c 1024

The RES column would be the REsident set Size.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks @VonC - "top" actually does display RSS but I was actually trying to get resident memory using pmap so that I can find what is actually sitting in the resident memory. Basically, I was trying to see the memory addresses and the total memory that is sitting there. – sunsin1985 Jul 29 '16 at 17:23