xref: /freebsd/share/man/man4/linprocfs.4 (revision 56b17de1e8360fe131d425de20b5e75ff3ea897c)
1.\" Written by Garrett Wollman
2.\" This file is in the public domain.
3.\"
4.Dd November 13, 2019
5.Dt LINPROCFS 4
6.Os
7.Sh NAME
8.Nm linprocfs
9.Nd Linux process file system
10.Sh SYNOPSIS
11.Bd -literal
12linproc		/compat/linux/proc	linprocfs	rw 0 0
13.Ed
14.Sh DESCRIPTION
15The Linux process file system, or
16.Nm ,
17emulates a subset of Linux' process file system and is required for
18the complete operation of some Linux binaries.
19.Pp
20The
21.Nm
22provides a two-level view of process space.
23At the highest level, processes themselves are named, according to
24their process ids in decimal, with no leading zeros.
25There is also a special node called
26.Pa self
27which always refers to the process making the lookup request.
28.Pp
29Each node is a directory containing several files:
30.Bl -tag -width status
31.It Pa exe
32A reference to the vnode from which the process text was read.
33This can be used to gain access to the process' symbol table,
34or to start another copy of the process.
35.It Pa mem
36The complete virtual memory image of the process.
37Only those addresses which exist in the process can be accessed.
38Reads and writes to this file modify the process.
39Writes to the text segment remain private to the process.
40.El
41.Pp
42Each node is owned by the process's user, and belongs to that user's
43primary group, except for the
44.Pa mem
45node, which belongs to the
46.Li kmem
47group.
48.Sh FILES
49.Bl -tag -width /compat/linux/proc/self/XXXXXXX -compact
50.It Pa /compat/linux/proc
51The normal mount point for the
52.Nm .
53.It Pa /compat/linux/proc/cpuinfo
54CPU vendor and model information in human-readable form.
55.It Pa /compat/linux/proc/meminfo
56System memory information in human-readable form.
57.It Pa /compat/linux/proc/pid
58A directory containing process information for process
59.Pa pid .
60.It Pa /compat/linux/proc/self
61A directory containing process information for the current process.
62.It Pa /compat/linux/proc/self/exe
63The executable image for the current process.
64.It Pa /compat/linux/proc/self/mem
65The complete virtual address space of the current process.
66.El
67.Sh EXAMPLES
68To mount a
69.Nm
70file system on
71.Pa /compat/linux/proc :
72.Pp
73.Dl "mount -t linprocfs linproc /compat/linux/proc"
74.Sh SEE ALSO
75.Xr mount 2 ,
76.Xr unmount 2 ,
77.Xr linux 4 ,
78.Xr procfs 5 ,
79.Xr pseudofs 9
80.Sh HISTORY
81The
82.Nm
83first appeared in
84.Fx 4.0 .
85.Sh AUTHORS
86.An -nosplit
87The
88.Nm
89was derived from
90.Nm procfs
91by
92.An Pierre Beyssac .
93This manual page was written by
94.An Dag-Erling Sm\(/orgrav ,
95based on the
96.Xr procfs 5
97manual page by
98.An Garrett Wollman .
99