/proc/pid/smaps

Posted aspirs

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了/proc/pid/smaps相关的知识,希望对你有一定的参考价值。

 

The /proc/PID/smaps is an extension based on maps, showing the memory consumption for each of the process‘s mappings. For each of mappings there is a series of lines such as the following:

08048000-080bc000 r-xp 00000000 03:02 13130      /bin/bash
Size:               1084 kB
Rss:                 892 kB
Pss:                 374 kB
Shared_Clean:        892 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:         0 kB
Referenced:          892 kB
Anonymous:             0 kB
Swap:                  0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Locked:              374 kB

The first of these lines shows the same information as is displayed for the mapping in /proc/PID/maps. The remaining lines show the size of the mapping (size), the amount of the mapping that is currently resident in RAM (RSS), the process‘ proportional share of this mapping (PSS), the number of clean and dirty private pages in the mapping. Note that even a page which is part of a MAP_SHARED mapping, but has only a single pte mapped, i.e. is currently used by only one process, is accounted as private and not as shared. "Referenced" indicates the amount of memory currently marked as referenced or accessed. "Anonymous" shows the amount of memory that does not belong to any file. Even a mapping associated with a file may contain anonymous pages: when MAP_PRIVATE and a page is modified, the file page is replaced by a private anonymous copy. "Swap" shows how much would-be-anonymous memory is also used, but out on swap.

 

 

from: https://stackoverflow.com/questions/9922928/what-does-pss-mean-in-proc-pid-smaps

 

以上是关于/proc/pid/smaps的主要内容,如果未能解决你的问题,请参考以下文章

使用 awk 解析 /proc/pid/smaps

linux /proc/$pid/smaps 文件中各个字段代表啥含义

dumpsys meminfo数据与smaps文件对应关系

面试系列——内存,CPU,帧率采集原理总结

面试系列——内存,CPU,帧率采集原理总结

JVM内存问题定位