1 .\" $FreeBSD: src/share/man/man5/procfs.5,v 1.14.2.5 2001/08/17 13:08:47 ru Exp $
2 .\" $DragonFly: src/share/man/man5/procfs.5,v 1.3 2006/05/26 19:39:40 swildner Exp $
3 .\" Written by Garrett Wollman
4 .\" This file is in the public domain.
11 .Nd process file system
14 proc /proc procfs rw 0 0
17 The process file system, or
19 implements a view of the system process table inside the file system.
20 It is normally mounted on
22 and is required for the complete operation of programs such as
29 provides a two-level view of process space, unlike the previous
33 At the highest level, processes themselves are named, according to
34 their process ids in decimal, with no leading zeros. There is also a
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
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 reference to the vnode 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.
94 The floating point registers as defined by
99 is only implemented on machines which have distinct general
100 purpose and floating point register sets.
102 A map of the process' virtual memory.
104 The complete virtual memory image of the process.
105 Only those address which exist in the process can be accessed.
106 Reads and writes to this file modify the process.
107 Writes to the text segment remain private to the process.
109 Used for sending signals to the process. Not implemented.
111 Used for sending signal to the process group. Not implemented.
113 Allows read and write access to the process' register set.
114 This file contains a binary data structure
119 can only be written when the process is stopped.
121 This is a read-only file containing the process current and maximum
123 Each line is of the format
124 .Ar rlimit current max ,
129 This file is read-only and returns a single line containing
130 multiple space-separated fields as follows:
144 .Ar major , Ns Ar minor
145 of the controlling terminal, or
147 if there is no controlling terminal.
149 a list of process flags:
151 if there is a controlling terminal,
153 if the process is a session leader,
155 if neither of the other two flags are set.
157 the process start time in seconds and microseconds,
160 the user time in seconds and microseconds,
163 the system time in seconds and microseconds,
166 the wait channel message
168 the process credentials consisting of
169 the effective user id
170 and the list of groups (whose first member
171 is the effective group id)
176 In a normal debugging environment,
177 where the target is fork/exec'd by the debugger,
178 the debugger should fork and the child should stop
179 itself (with a self-inflicted
182 The parent should issue a
186 command via the appropriate
189 The child process will receive a
191 immediately after the call to exec (see
194 Each node is owned by the process's user, and belongs to that user's
195 primary group, except for the
197 node, which belongs to the
201 .Bl -tag -width /proc/curproc/XXXXXXX -compact
203 normal mount point for the
206 directory containing process information for process
209 directory containing process information for the current process
210 .It Pa /proc/curproc/cmdline
211 the process executable name
212 .It Pa /proc/curproc/ctl
213 used to send control messages to the process
214 .It Pa /proc/curproc/etype
216 .It Pa /proc/curproc/file
218 .It Pa /proc/curproc/fpregs
219 the process floating point register set
220 .It Pa /proc/curproc/map
221 virtual memory map of the process
222 .It Pa /proc/curproc/mem
223 the complete virtual address space of the process
224 .It Pa /proc/curproc/note
225 used for signaling the process
226 .It Pa /proc/curproc/notepg
227 used for signaling the process group
228 .It Pa /proc/curproc/regs
229 the process register set
230 .It Pa /proc/curproc/rlimit
231 the process current and maximum rlimit
232 .It Pa /proc/curproc/status
233 the process' current status
242 This manual page written by
243 .An Garrett Wollman ,
244 based on the description
246 .An Jan-Simon Pendry ,
247 and revamped later by