Use it to read process details and kernel state without extra tools.
/proc · Filesystem
/proc is a virtual filesystem (procfs) generated by the kernel: one directory per process (/proc/<pid>) plus system information (/proc/cpuinfo, /proc/meminfo, /proc/sys).
1. ls -ld /proc and findmnt /proc — present and mounted where expected?
2. df -h /proc — space left? df -i /proc — inodes left?
3. Find large or unexpected content: du -xh --max-depth=1 /proc | sort -h | tail.
4. Permissions and owner as the FHS and services expect?
5. Fix space, permissions or mount, then retest the service.
/proc mounted (or virtual) → correct owner and permissions → enough space → services read and write as intended
For Filesystem → /proc, continue with the first unproven Topic check: Confirm procfs is mounted and identify the relevant process/PID/mount namespace. If that boundary is healthy, advance to the adjacent check: Correlate PID with start time/executable before using per-process evidence. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
kernel/process runtime state → namespace visibility → procfs synthesized object → reader identity/time → interpretation → workload correlation
Healthy evidence: the procfs sample is tied to the correct namespace, process start identity and time, and it correlates with the workload observation.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Confirm procfs is mounted and identify the relevant process/PID/mount namespace.
- Correlate PID with start time/executable before using per-process evidence.
- Timestamp volatile counters and compare repeated samples instead of treating one read as a trend.
- For tunables, verify both effective runtime value and intended persistence source.
Verification chain. kernel/process runtime state → namespace visibility → procfs synthesized object → reader identity/time → interpretation → workload correlation
Step 3 Specialized verification Verify boundary
Resolve the target process using stable context such as command, cgroup, start time and boot ID because PIDs can be reused. Read the relevant /proc entry from the same PID/mount/network namespace as the consumer. For open files use fd links; for mount questions use mountinfo; for memory use maps/status/smaps as appropriate. Correlate the snapshot with an external operation and timestamp. A missing path may mean the process exited or is outside the namespace, not that the kernel lacks the feature.
Step 4 Commands Verify boundary
cat /proc/cpuinfo | head
cat /proc/meminfo | head
cat /proc/<pid>/status
Step 5 Failure modes and next checks Narrow the fault
Suspicious evidence: stale/reused PIDs are trusted, container and host views are mixed, or a runtime proc/sys value is assumed persistent after reboot.
/proc shows a sampled kernel/process view for a namespace and instant, but it does not show historical state, persistence or application correctness.
Step 6 Special cases and limits Narrow the fault
procfs is an observation/control interface, not a durable configuration database. Data can change between reads and fields are kernel-version dependent. /proc/net commonly reflects the reader’s network namespace, not necessarily the host’s default network stack. Access denial can come from ordinary credentials, ptrace restrictions or procfs mount policy. A value shown in /proc shows what the kernel exposed at that instant, but it does not show application health, future persistence or what another namespace sees.
Step 7 Common mistakes Narrow the fault
- Treating
/procfiles as regular files to back up.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Nothing in /proc uses disk space. /proc/sys values can be changed with sysctl (persist in /etc/sysctl.d/). /proc/<pid>/ shows a process's command line, environment, open files and limits.
ls -ld <path>— owner, permissions and typestat <path>— inode, links, size and timestampsdf -h <path>— filesystem and free spacefindmnt <path>— which mount the path is on
ReferenceWhat it is1 section · depth on demand
Core model
Capture the same process/mount/PID namespace as the affected workload, then read the exact procfs object and timestamp the observation. Treat per-PID data as ephemeral and namespace-sensitive. For writable tunables, separate a runtime proc/sys change from persistent sysctl configuration.
ReferenceImportant terms & boundaries6 sections · depth on demand
What this shows and what it does not
/proc shows a sampled kernel/process view for a namespace and instant, but it does not show historical state, persistence or application correctness.
In depth
/proc: the process and kernel interface
The proc(5) manual page describes /proc as a pseudo-filesystem that provides an interface to kernel data structures. No file in it exists on disk. Most files are read-only, and some are writable so kernel variables can be changed. Every running process has a directory /proc/<pid>, and /proc/self always points to the calling process's own directory.
Per-process entries
| Entry | Shows |
|---|---|
cmdline | The command line (arguments separated by NUL bytes) |
environ | The environment (NUL-separated; readable by the owner only) |
status | State, UIDs, memory, threads, signal masks |
fd/ | Open file descriptors as symlinks |
cwd, exe, root | Working directory, executable, root directory |
maps | Memory mappings |
limits | Resource limits |
cgroup | Control group membership |
System-wide entries
| Entry | Shows |
|---|---|
/proc/cpuinfo, /proc/meminfo | CPUs and memory |
/proc/loadavg | Load averages and the number of processes |
/proc/mounts | Mounted file systems |
/proc/cmdline | Kernel command line |
/proc/sys/ | Tunable kernel parameters (sysctl) |
hidepid (manual)
By default, every user can see every process's directory. Mounting /proc with hidepid=1 stops users from reading other users' process files. hidepid=2 also hides the directories, so other users' processes aren't listed at all. The gid= option lets one group, such as a monitoring agent's group, still see everything.
host$ tr '\0' ' ' < /proc/$(pgrep -o nginx)/cmdline; echo
nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
host$ sudo ls -l /proc/$(pgrep -o nginx)/cwd /proc/$(pgrep -o nginx)/exe
host$ sudo ls -l /proc/$(pgrep -o nginx)/fd | grep -E "log|socket" | head -3
host$ grep -E "^(State|Threads|VmRSS)" /proc/$(pgrep -o nginx)/status
host$ cat /proc/loadavg
0.42 0.37 0.31 2/412 9811
host$ sudo mount -o remount,hidepid=2 /proc
host$ ls /proc | grep -c '^[0-9]'
Deleted but still open
ls -l /proc/<pid>/fd marks files that have been deleted but are still held open with "(deleted)". That explains "df says the disk is full but du can't find the files". Restarting the process, or truncating the file through its fd entry, frees the space.
Documented example, not captured output.
How it works at runtime
/proc is part of Filesystem → /proc. /proc is a procfs pseudo-filesystem exposing dynamic kernel and process information through file-like interfaces such as per-PID directories, mounts, memory/system counters and selected tunables; most content is synthesized at access time rather than stored on disk.
Pseudo-filesystems such as /proc, /sys and many entries under /run expose generated runtime state rather than ordinary persistent files.
Topic-specific state model. /proc is a procfs pseudo-filesystem exposing dynamic kernel and process information through file-like interfaces such as per-PID directories, mounts, memory/system counters and selected tunables; most content is synthesized at access time rather than stored on disk.
Interpretation rule. - /proc file content ≠ persistent file data on a backing disk.
- PID path identity ≠ durable process identity; PIDs can exit and be reused.
- Host /proc view ≠ container process namespace view.
- Runtime value under /proc/sys ≠ persistent setting across reboot unless configured elsewhere.
Specialized mechanics
/proc is procfs, a virtual filesystem generated from live kernel and process state rather than a directory of ordinary persistent files. Numeric directories represent processes visible in the current PID namespace; entries such as fd, status, maps, mountinfo and net expose different slices of process or namespace state. Many files are generated on read, some accept writes that alter runtime kernel state, and permissions can depend on ptrace policy, hidepid mount options and namespace boundaries. Treat every /proc observation as tied to a specific boot, PID identity and namespace.
Quick reference
/proc is a virtual filesystem exposing kernel and process state.
| Path | Content |
|---|---|
/proc/<pid>/ | cmdline, environ, status, fd/, maps, limits, cgroup |
/proc/cpuinfo, /proc/meminfo | Hardware/memory summary |
/proc/loadavg, /proc/uptime | Load and uptime |
/proc/mounts | Current mounts |
/proc/sys/ | Tunables (sysctl) |
/proc/pressure/ | PSI stall information |
cat /proc/$(pgrep -o nginx)/limits
ls -l /proc/$(pgrep -o nginx)/fd | wc -l
cat /proc/sys/vm/swappiness
Limits and how it fails
Primary failure point. /proc shows a sampled kernel/process view for a namespace and instant, but it does not show historical state, persistence or application correctness.
ReferenceConfiguration & state2 sections · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. /proc owns procfs semantics. Processes, sysctl, Networking, performance and container branches own interpretation of their specific procfs data.
Specialized lifecycle
The visible procfs tree depends on where procfs is mounted, mount options, kernel configuration and namespaces. Persistent configuration usually belongs to the subsystem represented by the file, not to the /proc pathname itself. For example, writing a tunable may change runtime state, while sysctl.d is normally the persistent administrative source. Container runtimes can mount filtered or read-only views. Before writing anything in /proc, identify the documented owning interface and whether a supported persistent mechanism exists instead of scripting direct writes as the only source of truth.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Filesystem → /proc. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html · confidence 94%Authoritative Linux project/vendor documentation reviewed for bounded reference claims: procfs runtime state, per-process views and kernel-exposed state. Documentation-based technical verification only; not lab or production-runtime proof. The schema vendor_doc method is used for authoritative project/vendor documentation; deployment applicability remains separate evidence.
Basis: https://docs.kernel.org/filesystems/proc.html · confidence 93%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
/proc operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for /proc.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | /proc is a procfs pseudo-filesystem exposing dynamic kernel and process information through file-like interfaces such as per-PID directories, mounts, memory/system counters and selected tunables; most content is synthesized at access time rather than stored on disk. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin process/container mount namespace → resolve the exact path from / and record every mount crossing → identify final dentry + filesystem/device + inode + file type → capture ownership/mode/ACL and capacity where relevant → map pseudo/device/runtime objects to the live kernel/process endpoint → verify the original consumer read/write/execute/service result. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | kernel/process runtime state → namespace visibility → procfs synthesized object → reader identity/time → interpretation → workload correlation | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | /proc proves a sampled kernel/process view for a namespace and instant; it does not prove historical state, persistence or application correctness. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated namespace, path and object evidence can establish this Linux Filesystem proof path: kernel/process runtime state → namespace visibility → procfs synthesized object → reader identity/time → interpretation → workload correlation | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured namespace, mount, inode/object, authorization, backing-resource or consumer scope. /proc proves a sampled kernel/process view for a namespace and instant; it does not prove historical state, persistence or application correctness. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: preserve the same process mount namespace, resolve the path and mount crossings, identify the exact object/inode or live pseudo/device endpoint, inspect effective access/capacity, then repeat the original consumer operation before changing unrelated filesystem state. | Continue to the next unresolved boundary while preserving the original test condition. |
/proc · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | /proc |
|---|---|
| Topic path | Filesystem → /proc |
| Runtime state | /proc is a procfs pseudo-filesystem exposing dynamic kernel and process information through file-like interfaces such as per-PID directories, mounts, memory/system counters and selected tunables; most content is synthesized at access time rather than stored on disk. |
| Fast checks | - Confirm procfs is mounted and identify the relevant process/PID/mount namespace. - Correlate PID with start time/executable before using per-process evidence. - Timestamp volatile counters and compare repeated samples instead of treating one read as a trend. - For tunables, verify both effective runtime value and intended persistence source. |
| Verification chain | kernel/process runtime state → namespace visibility → procfs synthesized object → reader identity/time → interpretation → workload correlation Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | /proc proves a sampled kernel/process view for a namespace and instant; it does not prove historical state, persistence or application correctness. Boundary chain: process credentials/namespace → path/mount lookup → DAC/ACL/LSM → filesystem metadata → block/device/backend → completion/read-back. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |
/proc · specialized operational reference
Topic-specific Linux mechanics, lifecycle, proof path and failure-boundary lookup.
| Operational boundary | Topic-specific reference |
|---|---|
| Object identity | Boot ID + PID start time + namespace |
| Process files | status, cmdline, fd, maps, mountinfo |
| Persistence | Use subsystem-supported config, not procfs as sole source |
| Boundary | Live generated view; namespace and version sensitive |