User Tools

Site Tools


proc:smaps_file

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
proc:smaps_file [2017/04/05 10:08] peterproc:smaps_file [2020/07/15 09:30] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Proc - smaps file ====== ====== Proc - smaps file ======
 +
 +The **/proc/PID/smaps** is an extension based on maps, showing the memory consumption for each of the process's mappings.  This file is only present if the **CONFIG_MMU** kernel configuration option is enabled.
  
 For SMP CONFIG users. For SMP CONFIG users.
  
 For making accounting scalable, RSS related information are handled in asynchronous manner and the value may not be very precise.  To see a precise snapshot of a moment, you can see **/proc/<pid>/smaps** file and scan page table.  It's slow but very precise. For making accounting scalable, RSS related information are handled in asynchronous manner and the value may not be very precise.  To see a precise snapshot of a moment, you can see **/proc/<pid>/smaps** file and scan page table.  It's slow but very precise.
- 
-The **/proc/PID/smaps** is an extension based on maps, showing the memory consumption for each of the process's mappings.  This file is only present if the **CONFIG_MMU** kernel configuration option is enabled. 
  
 For each of mappings there is a series of lines such as the following: For each of mappings there is a series of lines such as the following:
Line 12: Line 12:
 |08048000-080bc000|r-xp|00000000|03:02|13130|/bin/bash| |08048000-080bc000|r-xp|00000000|03:02|13130|/bin/bash|
  
-  * The first of these lines shows the same information as is displayed for the mapping in [[Proc:maps file|/proc/PID/maps]].+This shows the same information as is displayed for the mapping in [[Proc:maps file|/proc/PID/maps]]. 
 + 
 +Additional information is also shown:
  
 |Size:|1084 kB| |Size:|1084 kB|
Line 38: Line 40:
   * **Referenced** indicates the amount of memory currently marked as referenced or accessed.   * **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.   * **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.+    * 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.   * **Swap** shows how much would-be-anonymous memory is also used, but out on swap.
      
-**NOTE:**  Even a page which is part of a **MAP_SHARED mapping**, but which only has a single private mapped, i.e. is currently used by only one process, is accounted as __private__ and not as shared.  +**NOTE:**  Even a page which is part of a **MAP_SHARED** mapping, but which only has a single private mapped, i.e. is currently used by only one process, is accounted as __private__ and not as shared.  
  
proc/smaps_file.1491386914.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki