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.

status:
  Name:   bash
  State:  S (sleeping)
  Tgid:   3515
  Pid:   3515
  PPid:   3452
  TracerPid:   0
  Uid:   1000   1000   1000   1000
  Gid:   100   100   100   100
  FDSize: 256
  Groups: 16 33 100
  VmPeak:     9136 kB
  VmSize:     7896 kB
  VmLck:  0 kB
  VmHWM:      7572 kB
  VmRSS:      6316 kB
  VmData:     5224 kB
  VmStk: 88 kB
  VmExe:       572 kB
  VmLib:      1708 kB
  VmPTE: 20 kB
  Threads:   1
  SigQ:   0/3067
  SigPnd: 0000000000000000
  ShdPnd: 0000000000000000
  SigBlk: 0000000000010000
  SigIgn: 0000000000384004
  SigCgt: 000000004b813efb
  CapInh: 0000000000000000
  CapPrm: 0000000000000000
  CapEff: 0000000000000000
  CapBnd: ffffffffffffffff
  Cpus_allowed:   00000001
  Cpus_allowed_list:   0
  Mems_allowed:   1
  Mems_allowed_list:   0
  voluntary_ctxt_switches:   150
  nonvoluntary_ctxt_switches:   545
      The fields are as follows:
      * Name: Command run by this process.
  
   * State: Current state of the process.  One of "R (running)", "S
(sleeping)", "D (disk sleep)", "T (stopped)", "T (tracing  stop)",  "Z
 (zom-
bie)", or "X (dead)".
      * Tgid: Thread group ID (i.e., Process ID).
      * Pid: Thread ID (see gettid(2)).
      * TracerPid: PID of process tracing this process (0 if not being traced).
      * Uid, Gid: Real, effective, saved set, and file system UIDs (GIDs).
      * FDSize: Number of file descriptor slots currently allocated.
      * Groups: Supplementary group list.
      * VmPeak: Peak virtual memory size.
      * VmSize: Virtual memory size.
      * VmLck: Locked memory size.
      * VmHWM: Peak resident set size ("high water mark").
      * VmRSS: Resident set size.
      * VmData, VmStk, VmExe: Size of data, stack, and text segments.
      * VmLib: Shared library code size.
      * VmPTE: Page table entries size (since Linux 2.6.10).
      * Threads: Number of threads in process containing this thread.
      * SigPnd, ShdPnd: Number of signals pending for thread and for process as a whole (see pthreads(7) and signal(7)).
      * SigBlk, SigIgn, SigCgt: Masks indicating signals being blocked, ignored, and caught (see signal(7)).
  
   * CapInh, CapPrm, CapEff: Masks of capabilities enabled in
inheritable, permitted, and effective sets (see capabilities(7)).
      * CapBnd: Capability Bounding set (since kernel 2.6.26, see capabilities(7)).
      * Cpus_allowed: Mask of CPUs on which this process may run (since Linux 2.6.24, see cpuset(7)).
      * Cpus_allowed_list: Same as previous, but in "list format" (since Linux 2.6.26, see cpuset(7)).
      * Mems_allowed: Mask of memory nodes allowed to this process (since Linux 2.6.24, see cpuset(7)).
      * Mems_allowed_list: Same as previous, but in "list format" (since Linux 2.6.26, see cpuset(7)).
  
   * voluntary_context_switches, nonvoluntary_context_switches: Number
of voluntary and involuntary context switches (since Linux 2.6.23).
task:
进程包含的线程,子目录名是线程的ID

Linux /proc/pid目录下文件的含义 (转)的更多相关文章

  1. Linux /proc/pid目录下各文件含义

    /proc 是一个伪文件系统, 被用作内核数据结构的接口, 而不仅仅是解释说明/dev/kmem. /proc 里的大多数文件都是只读的, 但也可以通过写一些文件来改变内核变量. ( Linux 内核 ...

  2. linux 系统统计目录下文件夹的大小

    du -ah --max-depth=1     这个是我想要的结果  a表示显示目录下所有的文件和文件夹(不含子目录),h表示以人类能看懂的方式,max-depth表示目录的深度. du命令用来查看 ...

  3. linux 查看某个目录下文件的数量

    今日思语:时间是个庸医,却自称能包治百病~ 在linux环境下,经常需要查看某个文件目录下的文件数有多少,除了进入当前目录下查看,还可以使用命令: ls -l | grep "^-" ...

  4. Linux中 /proc/[pid] 目录各文件简析

    Linux 内核提供了一种通过 proc 文件系统,在运行时访问内核内部数据结构.改变内核设置的机制.proc 文件系统是一个伪文件系统,它只存在内存当中,而不占用外存空间.它以文件系统的方式为访问系 ...

  5. linux 只查看目录下文件夹

    只显示目录文件夹 ls -F |grep "/$" 显示 目录权限 ls -al |grep "^d" 只显示文件 ls -al |grep "^-& ...

  6. 【问题解决方案】Linux中进入目录下文件夹

    win系统中直接 cd+空格+文件夹名 Linux下 cd+空格+./+文件名 其中句点表示"当前目录" 除非在根目录不加,或者把路径写全用绝对路径进入 Linux下切换路径的相关 ...

  7. linux C遍历目录下文件

    参考链接: http://blog.sina.com.cn/s/blog_626b7339010161tr.html

  8. Linux中/proc目录下文件详解

    转载于:http://blog.chinaunix.net/uid-10449864-id-2956854.html Linux中/proc目录下文件详解(一)/proc文件系统下的多种文件提供的系统 ...

  9. Linux中/proc目录下文件详解(转贴)

      转载:http://www.sudu.cn/info/index.php?op=article&id=302529   Linux中/proc目录下文件详解(一) 声明:可以自由转载本文, ...

随机推荐

  1. [libGDX游戏开发教程]使用libGDX进行游戏开发(1)-游戏设计

    声明:<使用Libgdx进行游戏开发>是一个系列,文章的原文是<Learning Libgdx Game Development>,大家请周知.后续的文章连接在这里 使用Lib ...

  2. JDBC连接池(数据源)

    自定义连接池:用装饰设计模式将原连接的close方法改造成将连接还回数据源:装饰设计模式:http://www.cnblogs.com/tongxuping/p/6832518.html: 开源数据库 ...

  3. 虚拟机Visualbox安装Ubuntu Server

    关于虚拟机的新建及设置,请查看<Visualbox安装Ubuntu网络设置> 从光盘启动系统中,首先是选择语言,我这里选择英文 选择英文安装Ubuntu服务器 继续选择英文 选择地理位置, ...

  4. 优化MySQL插入方法的五个妙招

    以下是涉及到插入表格的查询的5种改进方法: 1)使用LOAD DATA INFILE从文本下载数据这将比使用插入语句快20倍. 2)使用带有多个VALUES列表的INSERT语句一次插入几行这将比使用 ...

  5. 洛谷 P3383 【模板】线性筛素数-线性筛素数(欧拉筛素数)O(n)基础题贴个板子备忘

    P3383 [模板]线性筛素数 题目描述 如题,给定一个范围N,你需要处理M个某数字是否为质数的询问(每个数字均在范围1-N内) 输入输出格式 输入格式: 第一行包含两个正整数N.M,分别表示查询的范 ...

  6. 51nod 多重背包问题(动态规划)

    多重背包问题 一个背包,承量有限为W,有n种物体,第i种物体,价值Vi,占用重量为 Wi,且有Ci件,选择物品若干放入背包,使得总重量不超过背包的承重.总价值最大? 输入 第1行,2个整数,N和W中间 ...

  7. 第3天-DIV+CSS布局

    盒子模型 margin 设置外边距宽度 有4个值的时候: maigin 10px 5px 15px 20px; (上.右.下.左)有3个值的时候: margin: 10px 5px 15px; (上. ...

  8. 第1天-html快速入门

    开发工具:HBuilder 创建项目: 在电脑本地磁盘创建项目目录,如"D:\project" 打开HBuilder,这个工具默认会创建一个项目,我们删掉即可,然后新建项目:&qu ...

  9. 【kruscal】【最小生成树】【离线】洛谷 P2266 爱的距离

    建图:每个点向它四周的点连边权为两点点权的差的绝对值的边. 由于有多个需要“施法”的点,所以相当于对每个这样的点,询问与它的距离在T以内的最长边的最小值,即多次询问. 最长边最小之类的,肯定是最小生成 ...

  10. 1.6(Spring MVC学习笔记)文件上传与下载

    一.文件上传 实现文件上传多数是采用表单提交数据, 但对于进行文件上传的表单需要满足一下几个条件 1.表单的method设置为post 2.表单的enctype设置为multipart/form-da ...