Use it to read kernel and process state directly, or to change runtime kernel settings.
/proc · Kernel & Hardware
/proc is the kernel's virtual filesystem for process and system information: /proc/<pid>/ for each process, /proc/cpuinfo, /proc/meminfo, /proc/mounts, and tunables under /proc/sys.
1. cat /proc/meminfo | head / /proc/cpuinfo.
2. A process: ls -l /proc/<pid>/fd, cat /proc/<pid>/status.
3. Tunable: sysctl <name>.
4. Change: sysctl -w <name>=<value>; persist in /etc/sysctl.d/.
5. sysctl --system and re-check.
kernel state → exposed as /proc files → read by tools → tunables written via sysctl
For Kernel & Hardware → /proc, continue with the first unproven Topic check: Record host/container namespace, boot ID, timestamp and exact /proc path plus units/semantics being interpreted. If that boundary is healthy, advance to the adjacent check: For process paths, bind PID to command/start time and inspect namespace/cgroup identity to avoid PID-reuse or scope mistakes. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
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 runtime object/process → procfs representation → namespace/permission view → operator/tool interpretation → correlated subsystem evidence → workload verification
Healthy evidence: the relevant procfs values are coherent with process/subsystem state, namespace scope is known and correlated runtime metrics align with the healthy workload baseline.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Record host/container namespace, boot ID, timestamp and exact /proc path plus units/semantics being interpreted.
- For process paths, bind PID to command/start time and inspect namespace/cgroup identity to avoid PID-reuse or scope mistakes.
- Correlate the runtime value with adjacent kernel logs,
/sys, scheduler/memory/I/O telemetry or persistent sysctl configuration as appropriate. - After changing a runtime tunable or workload condition, read back the value and repeat the original workload; verify persistence separately if required.
Verification chain. kernel runtime object/process → procfs representation → namespace/permission view → operator/tool interpretation → correlated subsystem evidence → workload verification
Step 3 Commands Verify boundary
cat /proc/loadavg
cat /proc/mounts
ls /proc/<pid>/fd | wc -l
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: values change unexpectedly, process identity is misattributed, namespace views differ, runtime sysctl differs from intended persistence or procfs evidence conflicts with logs/subsystem state.
Step 5 Common mistakes Narrow the fault
- Parsing human-oriented /proc files without care.
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.
Files are generated on read and use no disk. Change /proc/sys values with sysctl -w and persist them in /etc/sysctl.d/*.conf (sysctl --system to apply).
sysctl -a | grep <name>— kernel tunablesuname -r— running kernellsmod— loaded moduleslspci -k— PCI devices and the driver in uselsusb— USB devicesjournalctl -k -b -p warning— kernel warnings this boot
ReferenceWhat it is1 section · depth on demand
Core model
Treat /proc values as a view from a specific kernel, namespace and instant. Resolve the exact file and semantic unit, account for permissions, PID reuse and container namespaces, and correlate snapshots with time-series or workload evidence. For writable sysctl-backed entries, distinguish transient runtime state from persistent configuration sources.
ReferenceWhy it matters1 section · depth on demand
Overview
Kernel and process information in /proc for troubleshooting:
cat /proc/interrupts | head # IRQ distribution per CPU
cat /proc/softirqs | grep NET
cat /proc/net/dev # per-interface counters
cat /proc/sys/fs/file-nr # open file handles system-wide
cat /proc/<pid>/io # bytes read/written by a process
cat /proc/<pid>/sched | head
cat /proc/slabinfo | sort -k3 -nr | head
Runtime tunables under /proc/sys are set with sysctl -w and persisted in /etc/sysctl.d/*.conf (sysctl --system to reload).
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
/proc shows only the kernel/runtime state represented by the specific file in the captured namespace and instant; it does not automatically show persistence, history or application correctness.
/proc owns procfs runtime observation semantics.
In depth
Tuning the kernel through /proc/sys
/proc/sys exposes the kernel's tunable parameters, the same values sysctl reads and writes. The kernel's documentation for /proc/sys/vm describes memory-management settings that are often adjusted:
- swappiness (0–200, default 60) balances swapping against dropping file cache.
- dirty_background_ratio and dirty_ratio set when background writeback starts, and when writing processes must flush data themselves.
- overcommit_memory: 0 is a heuristic (the default), 1 always allows, and 2 forbids overcommit, limited by overcommit_ratio.
- min_free_kbytes keeps a reserve. The documentation warns that a value too high will OOM the machine instantly.
- drop_caches: 1 drops the page cache, 2 the slab and 3 both. The documentation warns of performance problems, and advises it only for testing.
- vfs_cache_pressure decides how eagerly inode and dentry caches are reclaimed.
- panic_on_oom makes an OOM a kernel panic, instead of killing a process.
Common tunables by area
| Area | Parameter | Typical reason to change |
|---|---|---|
| Memory | vm.swappiness | Databases and latency-sensitive services (lower) |
| Memory | vm.overcommit_memory=2 | Strict accounting (careful: allocations can fail) |
| Writeback | vm.dirty_background_ratio, vm.dirty_ratio | Avoid large write bursts on hosts with a lot of RAM |
| Networking | net.core.somaxconn, net.ipv4.ip_local_port_range | Busy servers and proxies |
| Files | fs.file-max, fs.inotify.max_user_watches | Many open files; file watchers |
| Kernel | kernel.pid_max, kernel.panic | Very many processes; automatic reboot after panic |
Applying changes
| Scope | Method |
|---|---|
| Now | sysctl -w name=value |
| Permanent | /etc/sysctl.d/<nn>-<name>.conf, then sysctl --system |
| Check the effective value | sysctl name |
host$ sysctl vm.swappiness vm.dirty_background_ratio vm.dirty_ratio vm.overcommit_memory
vm.swappiness = 60
vm.dirty_background_ratio = 10
vm.dirty_ratio = 20
vm.overcommit_memory = 0
host$ grep -E "^(Dirty|Writeback):" /proc/meminfo
Dirty: 4812332 kB
Writeback: 112004 kB
host$ printf 'vm.swappiness = 10\nvm.dirty_background_ratio = 5\n' | sudo tee /etc/sysctl.d/60-db.conf
host$ sudo sysctl --system | grep -A2 60-db
host$ sudo systemd-analyze cat-config sysctl.d | grep -n swappiness
Change one thing, and measure
Tuning values found online often apply to other kernels, or other workloads. Measure first, with PSI, vmstat and the application's own latency. Change one parameter, and measure again. systemd-analyze cat-config sysctl.d shows every file that sets a value, and which one wins.
Documented example, not captured output.
How it works at runtime
/proc is part of Kernel & Hardware → /proc. /proc is a kernel-generated pseudo-filesystem exposing process and system runtime state such as PIDs, memory, CPU, mounts, interrupts and selected tunables; its files are observations/interfaces, not persistent configuration by themselves.
Load average is runnable plus uninterruptible work, not CPU percentage. /proc and /sys are exported runtime interfaces whose fields can be architecture/kernel-version specific.
Topic-specific state model. /proc is a kernel-generated pseudo-filesystem exposing process and system runtime state such as PIDs, memory, CPU, mounts, interrupts and selected tunables; its files are observations/interfaces, not persistent configuration by themselves.
Technical metadata. Host/VM, distribution, boot ID, kernel release, CPU topology, cgroup/namespace, workload/process/thread, CPU user/system/idle/iowait/steal + run queue/load, memory available/reclaim/swap/fault/OOM, block device/LV/MD latency/queue/throughput, PCI/USB/DMI identity, module/driver/parameters, procfs/sysfs path, kernel logs and original workload result.
Interpretation rule. - A value in /proc ≠ persistent configuration across reboot.
/proc/<pid>exists now ≠ it refers to the same process identity observed earlier; PID reuse matters.- Host
/procview ≠ necessarily the same namespace/cgroup view visible inside a container. - One
/procsnapshot ≠ historical evidence for a transient resource or process event.
Mechanics
For Kernel & Hardware → /proc, stable identity is host + PID/process/cgroup/namespace + CPU/memory/device + workload identity.
Limits and how it fails
Primary failure point. /proc shows only the kernel/runtime state represented by the specific file in the captured namespace and instant; it does not automatically show persistence, history or application correctness.
A loaded module does not show device binding or correct firmware. sysfs/proc values are runtime interfaces, not always persistent configuration.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. /proc owns procfs runtime observation semantics. Kernel Modules/Hardware own driver binding; Processes owns process lifecycle; persistent sysctl configuration may be owned by distribution/system configuration.
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 Kernel & Hardware → /proc. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/ · confidence 94%Authoritative Linux project/vendor documentation reviewed for bounded reference claims: kernel and per-process state exposed through procfs. 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 kernel-generated pseudo-filesystem exposing process and system runtime state such as PIDs, memory, CPU, mounts, interrupts and selected tunables; its files are observations/interfaces, not persistent configuration by themselves. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin exact symptom + interval → identify host/VM, workload and authoritative kernel/device/resource scope → capture correlated runtime telemetry/state → attribute the abnormal signal to process/cgroup/device/driver → find first failed boundary → change one demonstrated cause → read back effective state → repeat original workload + regression check. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | kernel runtime object/process → procfs representation → namespace/permission view → operator/tool interpretation → correlated subsystem evidence → workload verification | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | /proc proves only the kernel/runtime state represented by the specific file in the captured namespace and instant; it does not automatically prove persistence, history or application correctness. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux resource/kernel evidence can establish this proof path: kernel runtime object/process → procfs representation → namespace/permission view → operator/tool interpretation → correlated subsystem evidence → workload verification | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured host/VM, boot, incident interval, namespace/cgroup, process, device, kernel/driver or workload scope. /proc proves only the kernel/runtime state represented by the specific file in the captured namespace and instant; it does not automatically prove persistence, history 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 resource/kernel boundary: preserve the exact incident scope, capture the adjacent process/cgroup/device/driver or subsystem state, change only the demonstrated cause, then repeat the original workload and regression checks. | 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 | Kernel & Hardware → /proc |
| Runtime state | /proc is a kernel-generated pseudo-filesystem exposing process and system runtime state such as PIDs, memory, CPU, mounts, interrupts and selected tunables; its files are observations/interfaces, not persistent configuration by themselves. |
| Fast checks | - Record host/container namespace, boot ID, timestamp and exact /proc path plus units/semantics being interpreted. - For process paths, bind PID to command/start time and inspect namespace/cgroup identity to avoid PID-reuse or scope mistakes. - Correlate the runtime value with adjacent kernel logs, /sys, scheduler/memory/I/O telemetry or persistent sysctl configuration as appropriate. - After changing a runtime tunable or workload condition, read back the value and repeat the original workload; verify persistence separately if required. |
| Verification chain | kernel runtime object/process → procfs representation → namespace/permission view → operator/tool interpretation → correlated subsystem evidence → workload verification 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 only the kernel/runtime state represented by the specific file in the captured namespace and instant; it does not automatically prove persistence, history or application correctness. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |