1PROC(5) Linux Programmer's Manual PROC(5)
2
3
4
6 proc - process information pseudo-file system
7
9 The proc file system is a pseudo-file system which is used as an inter‐
10 face to kernel data structures. It is commonly mounted at /proc. Most
11 of it is read-only, but some files allow kernel variables to be
12 changed.
13
14 The following outline gives a quick tour through the /proc hierarchy.
15
16 /proc/[pid]
17 There is a numerical subdirectory for each running process; the
18 subdirectory is named by the process ID. Each such subdirectory
19 contains the following pseudo-files and directories.
20
21 /proc/[pid]/auxv (since 2.6.0-test7)
22 This contains the contents of the ELF interpreter information
23 passed to the process at exec time. The format is one unsigned
24 long ID plus one unsigned long value for each entry. The last
25 entry contains two zeros.
26
27 /proc/[pid]/cgroup (since Linux 2.6.24)
28 This file describes control groups to which the process/task
29 belongs. For each cgroup hierarchy there is one entry contain‐
30 ing colon-separated fields of the form:
31
32 5:cpuacct,cpu,cpuset:/daemons
33
34 The colon-separated fields are, from left to right:
35
36 1. hierarchy ID number
37
38 2. set of subsystems bound to the hierarchy
39
40 3. control group in the hierarchy to which the process
41 belongs
42
43 This file is present only if the CONFIG_CGROUPS kernel configu‐
44 ration option is enabled.
45
46 /proc/[pid]/cmdline
47 This holds the complete command line for the process, unless the
48 process is a zombie. In the latter case, there is nothing in
49 this file: that is, a read on this file will return 0 charac‐
50 ters. The command-line arguments appear in this file as a set
51 of strings separated by null bytes ('\0'), with a further null
52 byte after the last string.
53
54 /proc/[pid]/coredump_filter (since kernel 2.6.23)
55 See core(5).
56
57 /proc/[pid]/cpuset (since kernel 2.6.12)
58 See cpuset(7).
59
60 /proc/[pid]/cwd
61 This is a symbolic link to the current working directory of the
62 process. To find out the current working directory of process
63 20, for instance, you can do this:
64
65 $ cd /proc/20/cwd; /bin/pwd
66
67 Note that the pwd command is often a shell built-in, and might
68 not work properly. In bash(1), you may use pwd -P.
69
70 In a multithreaded process, the contents of this symbolic link
71 are not available if the main thread has already terminated
72 (typically by calling pthread_exit(3)).
73
7