1 .\" $NetBSD: mount_procfs.8,v 1.33 2007/04/05 21:31:44 pooka Exp $
3 .\" Copyright (c) 1992, 1993
4 .\" The Regents of the University of California. All rights reserved.
5 .\" All rights reserved.
7 .\" This code is derived from software donated to Berkeley by
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\" notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\" notice, this list of conditions and the following disclaimer in the
17 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. Neither the name of the University nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" @(#)mount_procfs.8 8.3 (Berkeley) 6/1/94
42 .Nd mount the process file system
51 command attaches an instance of the process
52 namespace to the global filesystem namespace.
53 The conventional mount point is
55 The directory specified by
57 is converted to an absolute path before use.
58 This command is normally executed by
62 The options are as follows:
63 .Bl -tag -width indent
65 Do not support nodes which are not part of the original procfs
66 implementation but have been added for compatibility with the Linux
73 The root of the process filesystem
74 contains an entry for each active process.
75 These processes are visible as a directory whose
76 name is the process' pid.
77 In addition, the special entries
81 reference the current process.
84 symlink appears for compatibility with the Linux procfs implementation.
86 Each directory contains several files.
87 .Bl -tag -width status
89 This file is readonly and returns null-terminated strings
90 corresponding to the process' command line arguments.
91 For a system or zombie process, this file contains only a string
92 with the name of the process.
94 a writeonly file which supports a variety of control operations.
95 Control commands are written as strings to the
98 The control commands are:
99 .Bl -tag -width detach -compact
101 stops the target process and arranges for the sending
102 process to become the debug control process.
104 continue execution of the target process and
105 remove it from control by the debug process.
107 continue running the target process until
108 a signal is delivered, a breakpoint is hit, or the
109 target process exits.
111 single step the target process, with no signal delivery.
113 wait for the target process to stop.
114 The target process must be stopped before
115 any of the run, step, or signal commands are allowed.
118 The string can also be the name of a signal, lower case
122 in which case that signal is delivered to the process
126 A symbolic link that points to the current working directory of the
128 If the target process's current working directory is not available or
129 is not at or below the current process's root directory, this link
133 File descriptors which can be accessed through the file system.
136 for more information.
138 A reference to the vnode from which the process text was read.
139 This can be used to gain access to the process' symbol table,
140 or to start another copy of the process.
142 A map of the process' virtual memory.
144 A map of the process' virtual memory in a form like the
145 proc filesystem as implemented in Linux.
146 Note that the paths corresponding to file backed mappings will
147 not be present unless the kernel was built with the
148 NAMECACHE_ENTER_REVERSE option.
150 The complete virtual memory image of the process.
151 Only those addresses which exist in the process can be accessed.
152 Writes to this file modify the process.
153 Writes to the text segment normally remain private to the process,
154 since the text segment is mapped with MAP_PRIVATE; however, this is
161 Allows read and write access to the process' register set.
162 This file contains a binary data structure
165 .Pa \*[Lt]machine/reg.h\*[Gt] .
167 can only be written when the process is stopped.
169 The floating point registers as defined by
172 .Pa \*[Lt]machine/reg.h\*[Gt] .
174 is only implemented on machines which have distinct general
175 purpose and floating point register sets.
177 A symbolic link that points to the root directory of the process.
178 If the target process's root directory is not available or is not at
179 or below the current process's root directory, this link will point to
183 This file is readonly and returns a single line containing
184 multiple space-separated fields as follows:
199 of the controlling terminal, or
201 if there is no controlling terminal.
203 a list of process flags:
205 if there is a controlling terminal,
207 if the process is a session leader,
209 if neither of the other two flags are set.
211 the process start time in seconds and microseconds,
214 the user time in seconds and microseconds,
217 the system time in seconds and microseconds,
220 the wait channel message
222 the process credentials consisting of
223 the effective user id
224 and the list of groups (whose first member
225 is the effective group id)
230 In a normal debugging environment,
231 where the target is fork/exec'd by the debugger,
232 the debugger should fork and the child should stop
233 itself (with a self-inflicted
236 The parent should issue a
240 command via the appropriate
243 The child process will receive a
245 immediately after the call to exec (see
248 .Bl -tag -width /proc/curproc -compact
250 .It Pa /proc/#/cmdline
255 .It Pa /proc/#/fpregs
260 .It Pa /proc/#/notepg
263 .It Pa /proc/#/status
270 mount option is used, the following files are also available:
272 .Bl -tag -width /proc/meminfo -compact
287 utility first appeared in
290 This filesystem may not be NFS-exported
291 since most of the functionality of
293 requires that state be maintained.