linux中 pmap 命令详解
程序员文章站
2022-06-24 11:46:31
通过查看帮助,返回了如下信息:
usage: pmap [options] pid [pid ...]
options:
-x, --extended...
通过查看帮助,返回了如下信息:
usage: pmap [options] pid [pid ...] options: -x, --extended show details -x show even more details warning: format changes according to /proc/pid/smaps -xx show everything the kernel provides -c, --read-rc read the default rc -c, --read-rc-from=<file> read the rc from file -n, --create-rc create new default rc -n, --create-rc-to=<file> create new rc to file note: pid arguments are not allowed with -n, -n -d, --device show the device format -q, --quiet do not display header and footer -p, --show-path show path in the mapping -a, --range=<low>[,<high>] limit results to the given range -h, --help display this help and exit -v, --version output version information and exit for more details see pmap(1).
然后列出某个进程(pid:8868)的信息时如下:
pmap -x 8868 address kbytes rss dirty mode mapping 00007f789ec2d000 1668 1384 0 r-x-- libc-2.19.so 00007f789edce000 2048 0 0 ----- libc-2.19.so 00007f789efce000 16 16 16 r---- libc-2.19.so 00007f789efd2000 8 8 8 rw--- libc-2.19.so 00000000020e0000 4008 4008 4008 rw--- [ anon ] 00007f787c000000 132 24 24 rw--- [ anon ] 00007f787c021000 65404 0 0 ----- [ anon ] 00007f7880000000 132 12 12 rw--- [ anon ] 00007f7880021000 65404 0 0 ----- [ anon ] 00007f7884000000 148 92 92 rw--- [ anon ] 00007f7884025000 65388 0 0 ----- [ anon ]
以上列表项的含义如下:
address: 内存分配地址
kbytes: 实际分配的内存大小
rss: 程序实际占用的内存大小
mapping: 分配该内存的模块的名称
总结
以上所述是小编给大家介绍的linux中 pmap 命令详解,希望对大家有所帮助