The meaning of each file under the Linux/proc/pid directory

Source: Internet
Author: User


Properties of the process


Commands to execute when the process starts


soft chain pointing to the current working directory of the process

ll CWD is a soft connection.


The environment variables used by the process execution, the file contents are separated by a null byte (' _ '), and then ended with a null byte. The environment variables used by the get process are therefore used as follows:

(Cat/proc/pid/environ; echo) | Tr ' \000 ' \ n '


This directory contains all the files opened by the process , the file name is a file descriptor, and each soft connection in the directory points to the actual file opened by the process.

For example: Under the Nginx:

[Email protected]:/proc/22210/fd# ll
Total 0
Dr-x------2 root root 0 Oct 20 17:39.
Dr-xr-xr-x 9 root root 0 Oct 20 17:22.. /
lrwx------1 root root Oct 17:39 0-/dev/null
lrwx------1 root root Oct 17:39 1-/dev/null
lrwx------1 root root, Oct 17:39, socket:[2917559817]
L-WX------1 root root Oct 17:39 2-/opt/nginx/logs/error.log
L-WX------1 root root Oct 17:39 3-/opt/nginx/logs/access.log
lrwx------1 root root, Oct 17:39 6, socket:[2917557592]
lrwx------1 root root, Oct 17:39 7, socket:[2917557593]
L-WX------1 root root Oct 17:39 8-/opt/nginx/logs/error.log
lrwx------1 root root, Oct 17:39 9, socket:[2917559816]


This file stores information such as the soft limit of the process, the hard limit, and so on.

You can see the maximum number of descriptive words that the process allows to open.


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/

* Address: A process occupies a space of addresses.

* perms: Permission set

R = Read

w = Write

x = Execute

s = Shared

p = Private (copy on write)

* Offset: File offset.

* Dev: for Devices (Major:minor)

* Inode: The inode on the device. 0 is an inter-memory region with no inode associated, typically: BSS (uninitialized data)


A soft chain that points to a process catalog


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 are 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 was only present if the Config_mmu kernel configuration option was 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 100   Vmpeak:     9136 kb  vmsize:     7896 kb  vmlck:  0 kb  vmhwm: &NB Sp    7572 Kb  vmrss:      6316 kb  vmdata:     5224 kb   vmstk:88 Kb  vmexe:       572 kb  vmlib:      1708 Kb  vmpte : 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 is 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 descript or 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 wat ER mark ") .       * vmrss:resident set size.       * vmdata, VMSTK, VmEx E:size of data, stack, and text segments.       * vmlib:shared Library code SIZE.  &N Bsp    * vmpte:page table entries Size (since Linux 2.6.10) .       * threads:number of th Reads 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 caps Abilities enabled in inheritable, permitted, and effective sets (see capabilities (7)) .       * Ca Pbnd:capability bounding set (since kernel 2.6.26, see capabilities (7)) .       * cpus_allowed:m Ask of CPUs on which this process could run (since Linux 2.6.24, see Cpuset (7)) .       * Cpus_allow Ed_list:same as previous, but in the "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)) .      &NBSP ; * Mems_allowed_list:saMe as previous, but in the "list format" (since Linux 2.6.26, see Cpuset (7)) .       * Voluntary_conte Xt_switches, Nonvoluntary_context_switches:number of voluntary and involuntary context switches (since Linux 2.6.23). &nb Sp;task: The process contains the thread, and the subdirectory name is the ID of the thread

The meaning of each file under the Linux/proc/pid directory

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.