dmap 查看内存使用情况
最后一行的值
mapped 表示该进程映射的虚拟地址空间大小,也就是该进程预先分配的虚拟内存大小,即ps出的vsz
writeable/private 表示进程所占用的私有地址空间大小,也就是该进程实际使用的内存大小
shared 表示进程和其他进程共享的内存大小
循环显示进程2318 的设备格式的最后1行,间隔2秒,
[root@orcl:/root]$ while true; do pmap -d 2318 | tail -1; sleep 2; done
mapped: 1805072K writeable/private: 8324K shared: 1558540K
mapped: 1805072K writeable/private: 8324K shared: 1558540K
mapped: 1805072K writeable/private: 8324K shared: 1558540K
mapped: 1805072K writeable/private: 8324K shared: 1558540K
mapped: 1805072K writeable/private: 8324K shared: 1558540K
mapped: 1805072K writeable/private: 8324K shared: 1558540K
mapped: 1805072K writeable/private: 8324K shared: 1558540K
mapped: 1805072K writeable/private: 8324K shared: 1558540K
mapped: 1805072K writeable/private: 8324K shared: 1558540K
mapped: 1805072K writeable/private: 8324K shared: 1558540K
mapped: 1805072K writeable/private: 8324K shared: 1558540K
mapped: 1805072K writeable/private: 8324K shared: 1558540K
mapped: 1805072K writeable/private: 8324K shared: 1558540K
mapped: 1805072K writeable/private: 8324K shared: 1558540K
评论已关闭