2 .\" Written by Garrett Wollman
3 .\" This file is in the public domain.
10 .Nd process file system
13 proc /proc procfs rw 0 0
16 The process file system, or
18 implements a view of the system process table inside the file system.
19 It is normally mounted on
21 and is required for the complete operation of programs such as
28 provides a two-level view of process space, unlike the previous
32 At the highest level, processes themselves are named, according to
33 their process ids in decimal, with no leading zeros.
37 which always refers to the process making the lookup request.
39 Each node is a directory which contains the following entries:
41 Each directory contains several files:
42 .Bl -tag -width status
44 a write-only file which supports a variety
45 of control operations.
46 Control commands are written as strings to the
49 The control commands are:
50 .Bl -tag -width detach -compact
52 stops the target process and arranges for the sending
53 process to become the debug control process.
55 continue execution of the target process and
56 remove it from control by the debug process (which
57 need not be the sending process).
59 continue running the target process until
60 a signal is delivered, a breakpoint is hit, or the
63 single step the target process, with no signal delivery.
65 wait for the target process to come to a steady
66 state ready for debugging.
67 The target process must be in this state before
68 any of the other commands are allowed.
71 The string can also be the name of a signal, lower case
75 in which case that signal is delivered to the process
81 utility can be used to clear tracepoints in a stuck process.
83 The debug registers as defined by
88 is currently only implemented on the i386 architecture.
90 The type of the executable referenced by the
94 A symbolic link to the file from which the process text was read.
95 This can be used to gain access to the process' symbol table,
96 or to start another copy of the process.
97 If the file cannot be found, the link target is
100 The floating point registers as defined by
105 is only implemented on machines which have distinct general
106 purpose and floating point register sets.
108 A map of the process' virtual memory.
110 The complete virtual memory image of the process.
111 Only those address which exist in the process can be accessed.
112 Reads and writes to this file modify the process.
113 Writes to the text segment remain private to the process.
115 Used for sending signals to the process.
118 Used for sending signal to the process group.
121 Allows read and write of the kernel osrel value assigned to the process.
122 It affects the compatibility shims that are turned on and off
123 depending on the value.
124 Initial process value is read from the ABI note tag in the executed ELF image,
125 and is zero if the tag not supported by binary format or was not found.
127 Allows read and write access to the process' register set.
128 This file contains a binary data structure
133 can only be written when the process is stopped.
135 This is a read-only file containing the process current and maximum
137 Each line is of the format
138 .Ar rlimit current max ,
143 This file is read-only and returns a single line containing
144 multiple space-separated fields as follows:
158 .Ar major , Ns Ar minor
159 of the controlling terminal, or
161 if there is no controlling terminal.
163 a list of process flags:
165 if there is a controlling terminal,
167 if the process is a session leader,
169 if neither of the other two flags are set.
171 the process start time in seconds and microseconds,
174 the user time in seconds and microseconds,
177 the system time in seconds and microseconds,
180 the wait channel message
182 the process credentials consisting of
183 the effective user id
184 and the list of groups (whose first member
185 is the effective group id)
188 the hostname of the jail in which the process runs, or
190 to indicate that the process is not running within a jail.
194 In a normal debugging environment,
195 where the target is fork/exec'd by the debugger,
196 the debugger should fork and the child should stop
197 itself (with a self-inflicted
200 The parent should issue a
204 command via the appropriate
207 The child process will receive a
209 immediately after the call to exec (see
212 Each node is owned by the process's user, and belongs to that user's
213 primary group, except for the
215 node, which belongs to the
219 .Bl -tag -width /proc/curproc/XXXXXXX -compact
221 normal mount point for the
224 directory containing process information for process
227 directory containing process information for the current process
228 .It Pa /proc/curproc/cmdline
229 the process executable name
230 .It Pa /proc/curproc/ctl
231 used to send control messages to the process
232 .It Pa /proc/curproc/etype
234 .It Pa /proc/curproc/file
236 .It Pa /proc/curproc/fpregs
237 the process floating point register set
238 .It Pa /proc/curproc/map
239 virtual memory map of the process
240 .It Pa /proc/curproc/mem
241 the complete virtual address space of the process
242 .It Pa /proc/curproc/note
243 used for signaling the process
244 .It Pa /proc/curproc/notepg
245 used for signaling the process group
246 .It Pa /proc/curproc/osrel
247 the process osrel value
248 .It Pa /proc/curproc/regs
249 the process register set
250 .It Pa /proc/curproc/rlimit
251 the process current and maximum rlimit
252 .It Pa /proc/curproc/status
253 the process' current status
261 .Dl "mount -t procfs proc /proc"
271 This manual page written by
272 .An Garrett Wollman ,
273 based on the description
275 .An Jan-Simon Pendry ,
276 and revamped later by