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
24 provides a two-level view of process space, unlike the previous
28 At the highest level, processes themselves are named, according to
29 their process ids in decimal, with no leading zeros.
33 which always refers to the process making the lookup request.
35 Each node is a directory which contains the following entries:
37 Each directory contains several files:
38 .Bl -tag -width status
40 a write-only file which supports a variety
41 of control operations.
42 Control commands are written as strings to the
45 The control commands are:
46 .Bl -tag -width detach -compact
48 stops the target process and arranges for the sending
49 process to become the debug control process.
51 continue execution of the target process and
52 remove it from control by the debug process (which
53 need not be the sending process).
55 continue running the target process until
56 a signal is delivered, a breakpoint is hit, or the
59 single step the target process, with no signal delivery.
61 wait for the target process to come to a steady
62 state ready for debugging.
63 The target process must be in this state before
64 any of the other commands are allowed.
67 The string can also be the name of a signal, lower case
71 in which case that signal is delivered to the process
77 utility can be used to clear tracepoints in a stuck process.
79 The debug registers as defined by
84 is currently only implemented on the i386 architecture.
86 The type of the executable referenced by the
90 A symbolic link to the file from which the process text was read.
91 This can be used to gain access to the process' symbol table,
92 or to start another copy of the process.
93 If the file cannot be found, the link target is
96 The floating point registers as defined by
101 is only implemented on machines which have distinct general
102 purpose and floating point register sets.
104 A map of the process' virtual memory.
106 The complete virtual memory image of the process.
107 Only those address which exist in the process can be accessed.
108 Reads and writes to this file modify the process.
109 Writes to the text segment remain private to the process.
111 Used for sending signals to the process.
114 Used for sending signal to the process group.
117 Allows read and write of the kernel osrel value assigned to the process.
118 It affects the compatibility shims that are turned on and off
119 depending on the value.
120 Initial process value is read from the ABI note tag in the executed ELF image,
121 and is zero if the tag not supported by binary format or was not found.
123 Allows read and write access to the process' register set.
124 This file contains a binary data structure
129 can only be written when the process is stopped.
131 This is a read-only file containing the process current and maximum
133 Each line is of the format
134 .Ar rlimit current max ,
139 This file is read-only and returns a single line containing
140 multiple space-separated fields as follows:
155 of the controlling terminal, or
158 if there is no controlling terminal.
160 a list of process flags:
162 if there is a controlling terminal,
164 if the process is a session leader,
166 if neither of the other two flags are set.
168 the process start time in seconds and microseconds,
171 the user time in seconds and microseconds,
174 the system time in seconds and microseconds,
177 the wait channel message
179 the process credentials consisting of
180 the effective user id
181 and the list of groups (whose first member
182 is the effective group id)
185 the hostname of the jail in which the process runs, or
187 to indicate that the process is not running within a jail.
191 In a normal debugging environment,
192 where the target is fork/exec'd by the debugger,
193 the debugger should fork and the child should stop
194 itself (with a self-inflicted
197 The parent should issue a
201 command via the appropriate
204 The child process will receive a
206 immediately after the call to exec (see
209 Each node is owned by the process's user, and belongs to that user's
210 primary group, except for the
212 node, which belongs to the
216 .Bl -tag -width /proc/curproc/XXXXXXX -compact
218 normal mount point for the
221 directory containing process information for process
224 directory containing process information for the current process
225 .It Pa /proc/curproc/cmdline
226 the process executable name
227 .It Pa /proc/curproc/ctl
228 used to send control messages to the process
229 .It Pa /proc/curproc/etype
231 .It Pa /proc/curproc/file
233 .It Pa /proc/curproc/fpregs
234 the process floating point register set
235 .It Pa /proc/curproc/map
236 virtual memory map of the process
237 .It Pa /proc/curproc/mem
238 the complete virtual address space of the process
239 .It Pa /proc/curproc/note
240 used for signaling the process
241 .It Pa /proc/curproc/notepg
242 used for signaling the process group
243 .It Pa /proc/curproc/osrel
244 the process osrel value
245 .It Pa /proc/curproc/regs
246 the process register set
247 .It Pa /proc/curproc/rlimit
248 the process current and maximum rlimit
249 .It Pa /proc/curproc/status
250 the process' current status
258 .Dl "mount -t procfs proc /proc"
268 This manual page written by
269 .An Garrett Wollman ,
270 based on the description
272 .An Jan-Simon Pendry ,
273 and revamped later by