linux - Alpine Linux : pmap output not showing RSS

标签 linux docker alpine-linux pmap

我有一个运行 alpine linux 基础镜像的 docker 容器,当我进入 docker 容器并运行命令时:

pmap -x [pid]

我在输出中看到的 header 是:

地址千字节 PSS 脏交换模式映射

我实际上是在明确地寻找 RSS(常驻集大小)。为什么这个 header 没有出现在输出中?

最佳答案

如果 pmap 没有在那个特定的 docker 图像 (Alpine) 中显示它,请检查 top 是否在其输出中更完整(如 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

RES 列将是驻留集大小。

关于linux - Alpine Linux : pmap output not showing RSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38624052/

相关文章:

python - 使用python删除docker容器中的文件夹

docker - 在 Mac 上的 Docker 中,带有符号链接(symbolic link)的 tarball 上的 `tar -zxvf` 失败(tar : Cannot utime: No such file or directory)

python - 如何在 Alpine 上安装 matplotlib

linux - pthread_self() 和 gettid() 有什么区别?我应该使用哪一个?

linux - 如何将一串数组放入文件

c++ - PROT_EXEcflags在 mprotect 中有什么作用?

linux - 使用剧本的 YAML 语法错误 (Ansible)

docker - 无法在 Docker 容器内调用 chown(Docker for Windows)

linux - 使用 2 个命令时 docker run 抛出错误 `No such file or directory`

mysql - 在Alpine下的虚拟机上安装Mysql