1.\" Written by Garrett Wollman 2.\" This file is in the public domain. 3.\" 4.Dd May 29, 2025 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 process node is a directory containing several files: 30.Bl -tag -width oom_score_adj 31.It Pa auxv 32The auxiliary vector passed to the program. 33.It Pa cmdline 34The command line used to execute the process. 35.It Pa cwd 36A symbolic link pointing to the current work directory of the process. 37.It Pa environ 38The list of environment variables and values of the process. 39Every variable and pair value is separated from the next by a NULL byte. 40.It Pa exe 41A reference to the vnode from which the process text was read. 42This can be used to gain access to the process' symbol table, 43or to start another copy of the process. 44.It Pa limits 45The soft and hard limits for the process along with the units used. 46.It Pa maps 47Memory map of the process. 48.It Pa mem 49The complete virtual memory image of the process. 50Only those addresses which exist in the process can be accessed. 51Reads and writes to this file modify the process. 52Writes to the text segment remain private to the process. 53.It Pa mountinfo 54Information about mount points. 55.It Pa mounts 56Similar to the above. 57.It Pa oom_score_adj 58Score adjustment for the Out Of Memory killer. 59.It Pa root 60Symbolic link to the root directory for this process. 61.It Pa stat 62Process statistics. 63It includes user, nice, system, idle, iowait, irq, softirq, 64steal, guest and guest_nice. 65.It Pa statm 66Process size statistics. 67It includes total program size, resident set size, number of resident shared 68pages (unused), text size, library size (unused), data + stack and dirty pages 69(unused). 70.It Pa status 71Process statistics in human readable form. 72It includes process name, state, PID, 73etc. 74.It Pa task 75Dummy directory to avoid problems in specific software such as Chromium. 76.El 77.Pp 78Each node is owned by the process's user, and belongs to that user's 79primary group, except for the 80.Pa mem 81node, which belongs to the 82.Li kmem 83group. 84.Sh FILES 85.Bl -tag -width /compat/linux/proc/filesystems -compact 86.It Pa /compat/linux/proc 87The normal mount point for 88.Nm . 89.It Pa /compat/linux/proc/cmdline 90Contains the path of the kernel image used to boot the system. 91.It Pa /compat/linux/proc/cpuinfo 92CPU vendor and model information in human-readable form. 93.It Pa /compat/linux/proc/devices 94List of character and block devices. 95The later is usually empty on 96.Fx . 97.It Pa /compat/linux/proc/filesystems 98List of supported filesystems. 99For pseudo filesystems, the first column contains 100.Em nodev . 101.It Pa /compat/linux/proc/meminfo 102System memory information in human-readable form. 103.It Pa /compat/linux/proc/modules 104Loaded kernel modules. 105Empty for now. 106.It Pa /compat/linux/proc/mounts 107Devices corresponding mount points. 108.It Pa /compat/linux/proc/mtab 109Same as above. 110.It Pa /compat/linux/proc/partitions 111Partition information including major and minor numbers, number of blocks and 112name. 113The rest of the fields are set to zero. 114.It Pa /compat/linux/proc/stat 115System statistics. 116For each cpu it includes at most user time, nice time, system 117time and idle time, iowait (time waiting for I/O to complete), times serving 118irqs and softirq, steal, guest and guest_nice times that represent times spent 119in different modes in a virtualized environment. 120The last columns are set to zero. 121This file also contains brief statistics for disks, context switches and 122more. 123.It Pa /compat/linux/proc/swap 124Information about the swap device if any. 125.It Pa /compat/linux/proc/uptime 126Time since the last boot and time spent in idle state. 127.It Pa /compat/linux/proc/version 128Version of the emulated linux system. 129.It Pa /compat/linux/proc/pid 130A directory containing process information for process 131.Pa pid . 132.It Pa /compat/linux/proc/self 133A directory containing process information for the current process. 134.El 135.Sh EXAMPLES 136To mount a 137.Nm 138file system on 139.Pa /compat/linux/proc : 140.Pp 141.Dl "mount -t linprocfs linproc /compat/linux/proc" 142.Sh SEE ALSO 143.Xr mount 2 , 144.Xr unmount 2 , 145.Xr auxv 3 , 146.Xr linux 4 , 147.Xr procfs 5 , 148.Xr pseudofs 9 149.Sh HISTORY 150The 151.Nm 152first appeared in 153.Fx 4.0 . 154.Sh AUTHORS 155.An -nosplit 156The 157.Nm 158was derived from 159.Nm procfs 160by 161.An Pierre Beyssac . 162This manual page was written by 163.An Dag-Erling Sm\(/orgrav , 164based on the 165.Xr procfs 5 166manual page by 167.An Garrett Wollman . 168