Linux /proc/pid目录下文件的含义 (转)
2015-09-24 14:09
549 查看
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
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上部署项目
- Linux查看硬件相关信息
- centOS 安装 LAMP + Phalocn【可行】
- Linux 命令 - route: 显示或操作路由表
- LTP--linux稳定性测试 linux性能测试 ltp压力测试 ---IBM 的 linux test project
- linux 系统上的 交叉编译 opencv 目标 ARM
- 3、linux文件夹简单操作和光盘挂载
- linux(centos)源码安装git
- Linux 无法开放3306端口解决方案
- Linux:闪光的宝石,智慧 (在)
- 虚拟机centos7,开启samba,设置开机启动
- Linux各种企业客户操作系统平台
- Centos 6.5 挂载硬盘 4K对齐 (笔记 实测)
- 如何在 linux 中搭建 FTP 服务
- Linux 中,如何显示 (gcc)make时实际执行命令
- gcc和arm-linux-gcc 头文件寻找路径
- CentOS 7 之 hostapd 路由模式配置
- 硬盘大于2T以上,用parted创建分区安装centos6.5
- 查找当前目录下包含特定字符串的特殊后缀名的文件
- 简单讲解Linux的文件系统及相关的挂载命令