1 .\" $FreeBSD: src/share/man/man5/procfs.5,v 1.14.2.5 2001/08/17 13:08:47 ru Exp $
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. There is also a
36 which always refers to the process making the lookup request.
38 Each node is a directory which contains the following entries:
40 Each directory contains several files:
41 .Bl -tag -width status
43 a write-only file which supports a variety
44 of control operations.
45 Control commands are written as strings to the
48 The control commands are:
49 .Bl -tag -width detach -compact
51 stops the target process and arranges for the sending
52 process to become the debug control process.
54 continue execution of the target process and
55 remove it from control by the debug process (which
56 need not be the sending process).
58 continue running the target process until
59 a signal is delivered, a breakpoint is hit, or the
62 single step the target process, with no signal delivery.
64 wait for the target process to come to a steady
65 state ready for debugging.
66 The target process must be in this state before
67 any of the other commands are allowed.
70 The string can also be the name of a signal, lower case
74 in which case that signal is delivered to the process
78 The debug registers as defined by
83 The type of the executable referenced by the
87 A reference to the vnode from which the process text was read.
88 This can be used to gain access to the process' symbol table,
89 or to start another copy of the process.
91 The floating point registers as defined by
96 is only implemented on machines which have distinct general
97 purpose and floating point register sets.
99 A map of the process' virtual memory.
101 The complete virtual memory image of the process.
102 Only those address which exist in the process can be accessed.
103 Reads and writes to this file modify the process.
104 Writes to the text segment remain private to the process.
106 Used for sending signals to the process. Not implemented.
108 Used for sending signal to the process group. Not implemented.
110 Allows read and write access to the process' register set.
111 This file contains a binary data structure
116 can only be written when the process is stopped.
118 This is a read-only file containing the process current and maximum
120 Each line is of the format
121 .Ar rlimit current max ,
126 This file is read-only and returns a single line containing
127 multiple space-separated fields as follows:
141 .Ar major , Ns Ar minor
142 of the controlling terminal, or
144 if there is no controlling terminal.
146 a list of process flags:
148 if there is a controlling terminal,
150 if the process is a session leader,
152 if neither of the other two flags are set.
154 the process start time in seconds and microseconds,
157 the user time in seconds and microseconds,
160 the system time in seconds and microseconds,
163 the wait channel message
165 the process credentials consisting of
166 the effective user id
167 and the list of groups (whose first member
168 is the effective group id)
173 In a normal debugging environment,
174 where the target is fork/exec'd by the debugger,
175 the debugger should fork and the child should stop
176 itself (with a self-inflicted
179 The parent should issue a
183 command via the appropriate
186 The child process will receive a
188 immediately after the call to exec (see
191 Each node is owned by the process's user, and belongs to that user's
192 primary group, except for the
194 node, which belongs to the
198 .Bl -tag -width /proc/curproc/XXXXXXX -compact
200 normal mount point for the
203 directory containing process information for process
206 directory containing process information for the current process
207 .It Pa /proc/curproc/cmdline
208 the process executable name
209 .It Pa /proc/curproc/ctl
210 used to send control messages to the process
211 .It Pa /proc/curproc/etype
213 .It Pa /proc/curproc/file
215 .It Pa /proc/curproc/fpregs
216 the process floating point register set
217 .It Pa /proc/curproc/map
218 virtual memory map of the process
219 .It Pa /proc/curproc/mem
220 the complete virtual address space of the process
221 .It Pa /proc/curproc/note
222 used for signaling the process
223 .It Pa /proc/curproc/notepg
224 used for signaling the process group
225 .It Pa /proc/curproc/regs
226 the process register set
227 .It Pa /proc/curproc/rlimit
228 the process current and maximum rlimit
229 .It Pa /proc/curproc/status
230 the process' current status
239 This manual page written by
240 .An Garrett Wollman ,
241 based on the description
243 .An Jan-Simon Pendry ,
244 and revamped later by