Linux /proc/pid目录下文件的含义 (转)
2013-01-16 16:10:36
分类: LINUX
attr:
进程的属性
cmdline:
启动进程时执行的命令
cwd:
指向进程当前工作目录的软链
environ:
进程执行时使用的环境变量,文件内容使用null字节('\0')分隔,然后以null字节结束。因此获取进程使用的环境变量使用如下:
(cat /proc/pid/environ; echo) | tr '\000' '\n'
fd:
此目录包含进程打开的所有文件,文件名为文件描述符,目录中每个软连接都会指向进程打开的实际文件。
limits:
该文件存储了进程的软限制,硬限制等信息。
maps:
address perms offset dev inode pathname
08048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm
4001f000-40135000 r-xp 00000000 03:0c 45494 /lib/libc-2.2.4.so
* address:进程占用的地址空间。
* perms:权限集
r = read
w = write
x = execute
s = shared
p = private (copy on write)
* offset:文件偏移量。
* dev:为设备(major:minor)
* inode:设备上的inode。0为没有inode关联互内存区域,通常为:BSS(uninitialized data)
root:
指向进程更目录的软链
smaps:
This file shows 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: 464 kB
Rss: 424 kB
Shared_Clean: 424 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 0 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, the amount of the mapping that is currently resident in RAM, the number of clean and dirty shared pages in the mapping, and the
number of clean and dirty private pages in the mapping.
This file is only present if the CONFIG_MMU kernel configuration option is enabled.
* State: Current state of the process. One of "R (running)", "S
(sleeping)", "D (disk sleep)", "T (stopped)", "T (tracing stop)", "Z
(zom-
* CapInh, CapPrm, CapEff: Masks of capabilities enabled in
inheritable, permitted, and effective sets (see capabilities(7)).
* voluntary_context_switches, nonvoluntary_context_switches: Number
of voluntary and involuntary context switches (since Linux 2.6.23).
Linux /proc/pid目录下文件的含义 (转)的更多相关文章
- Linux /proc/pid目录下各文件含义
/proc 是一个伪文件系统, 被用作内核数据结构的接口, 而不仅仅是解释说明/dev/kmem. /proc 里的大多数文件都是只读的, 但也可以通过写一些文件来改变内核变量. ( Linux 内核 ...
- linux 系统统计目录下文件夹的大小
du -ah --max-depth=1 这个是我想要的结果 a表示显示目录下所有的文件和文件夹(不含子目录),h表示以人类能看懂的方式,max-depth表示目录的深度. du命令用来查看 ...
- linux 查看某个目录下文件的数量
今日思语:时间是个庸医,却自称能包治百病~ 在linux环境下,经常需要查看某个文件目录下的文件数有多少,除了进入当前目录下查看,还可以使用命令: ls -l | grep "^-" ...
- Linux中 /proc/[pid] 目录各文件简析
Linux 内核提供了一种通过 proc 文件系统,在运行时访问内核内部数据结构.改变内核设置的机制.proc 文件系统是一个伪文件系统,它只存在内存当中,而不占用外存空间.它以文件系统的方式为访问系 ...
- linux 只查看目录下文件夹
只显示目录文件夹 ls -F |grep "/$" 显示 目录权限 ls -al |grep "^d" 只显示文件 ls -al |grep "^-& ...
- 【问题解决方案】Linux中进入目录下文件夹
win系统中直接 cd+空格+文件夹名 Linux下 cd+空格+./+文件名 其中句点表示"当前目录" 除非在根目录不加,或者把路径写全用绝对路径进入 Linux下切换路径的相关 ...
- linux C遍历目录下文件
参考链接: http://blog.sina.com.cn/s/blog_626b7339010161tr.html
- Linux中/proc目录下文件详解
转载于:http://blog.chinaunix.net/uid-10449864-id-2956854.html Linux中/proc目录下文件详解(一)/proc文件系统下的多种文件提供的系统 ...
- Linux中/proc目录下文件详解(转贴)
转载:http://www.sudu.cn/info/index.php?op=article&id=302529 Linux中/proc目录下文件详解(一) 声明:可以自由转载本文, ...
随机推荐
- Java处理文件BOM头的方式推荐
背景: java普通的文件读取方式对于bom是无法正常识别的. 使用普通的InputStreamReader,如果采用的编码正确,那么可以获得正确的字符,但bom仍然附带在结果中,很容易导致数据处理出 ...
- C# 连接SQL数据库以及操作数据库
1.概述 ado.net提供了丰富的数据库操作,这些操作可以分为三个步骤: 第一,使用SqlConnection对象连接数据库: 第二,建立SqlCommand对象,负责SQL语句的执行和存储过程的调 ...
- opencv对鼠标的响应
#include <cv.h> #include <highgui.h> #include <stdio.h> #pragma comment(lib,&quo ...
- HDU 2523 sort (hash)
#include<iostream> #include<cstring> #include<cmath> #include<cstdio> using ...
- 1090: MTM (费用流)
1090: MTM Time Limit:3000/1000 MS (Java/Others) Memory Limit:163840/131072 KB (Java/Others)Total S ...
- Oracle 后台进程 详细说明
一. 进程概述 先来看一下Oracle 11g 的架构图. 看起来比较模糊,我已经上传到了csdn 的下载. 是个pdf 文件, 2m 多. 那个看起来比较清楚. 也对每个进程做了解释. 下载地址:O ...
- java.lang.ClassCastException: com.sun.proxy.$Proxy13 cannot be cast to sm.dao.UserDao
在Spring中添加事物管理以后出现的问题 源代码 ApplicationContext applicationContext = new ClassPathXmlApplicationContext ...
- 【kmp算法】hdu4763 Theme Section
kmp中next数组的含义是:next[i]表示对于s[0]~s[i-1]这个前缀而言,最大相等的前后缀的长度是多少.规定next[0]=-1. 迭代for(int i=next[i];i!=-1;i ...
- 【费用流】bzoj2661 [BeiJing wc2012]连连看
将每个数拆点,互相连边,然后满足条件的数对之间互相连边,跑最大费用流,答案是流量和费用分别除以2. 一定要i->j.j->i都连上,否则可能会出现一个数在一边被选择了,在另一边的另一个匹配 ...
- 1.6(学习笔记)Session
一. Session简介 Session是用于解决HTTP无状态问题,HTTP协议本身是没有状态的, 就类似一个没有记性的商人,每次只交易当前的货物,交易完后就忘记了 以前的交易历史.我们和商人交易时 ...