问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/38624052/alpine-linux-pmap-output-not-showing-rss