linux /proc/pid/smaps各字段含义
2015-06-10 20:03
791 查看
/proc/$PID/smaps
第一行:
08048000-080bc000 地址空间的开始地址 - 结束地址
r-xp 属性。前三个是rwx(读、写、可执行),如果不具有则为“-”。最后一个是p/s(私有/共享)
00000000 偏移量。如果这段内存是从文件里映射过来的,则偏移量为这段内容在文件中的偏移量。如果不是从文件里面映射过来的则为0.
03:02 If the region was mapped from a file, this is the major and minor device number (in hex) where the file lives.
13130 If the region was mapped from a file, this is the file number.
/bin/bash If the region was mapped from a file, this is the name of the file. This field is blank for anonymous mapped regions. There are also special regions with names like [heap], [stack], or [vdso]. [vdso] stands for virtual dynamic shared object. It’s used by system calls to switch to kernel mode.
Rss-Resident Set Size 实际使用物理内存(包含共享库占用的内存)
Rss=Shared_Clean+Shared_Dirty+Private_Clean+Private_Dirty
Pss 实际使用的物理内存(按比例包含共享库占用的内存)。比如四个进程共享同一个占内存1000MB的共享库,每个进程算进250MB在Pss。
Shared_Clean 、 Shared_Dirty 、 Private_Clean、 Private_Dirty
(shared/private)共享和私有
一个页的clean字段表示没有更改此页,当发生换页时不用写回。dirty表示更改了此页,当发生换页时要写回磁盘。此处这四个值是遍历页表中各个页后得到的。
“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.
相关文章推荐
- linux环境下静态ip的设置
- linux RTAI模块编程遇到的问题
- linux之MySQL(Structured Query Language)结构化查询语言
- Linux系统中校验下载文件的完整性方法(MD5,SHA1,PGP)
- Linux iptables:规则组成
- Linux iptables:规则原理和基础
- linux系统性能监控工具--htop与dstat介绍
- linux 校验工具
- Linux 条件测试语句
- linux sync命令
- centos 单网卡批量添加不同IP段
- centos/debian配置gitlab 7.1x来搭建自建的git仓库.
- linux ssh port forward
- linux添加环境变量
- 配置xmanager5连接虚拟机中的linux(基于centos5.5 32位)
- Ubuntu 14.04 Linux内核版本3.16.0内核模块开发Makefile文件样板
- linux无法连接wifi,不显示wifi
- Linux系统编程——多线程实现多任务
- Linux文件系统
- Linux 系统目录结构