Pcornel
Linux · Kernel & Hardware

/proc

Cheat sheet · https://pcornel.dk/topic.php?topic=2841

Back to the Topic

Answer

/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.

Remember

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).

First checks

  • sysctl -a | grep <name> — kernel tunables
  • uname -r — running kernel
  • lsmod — loaded modules
  • lspci -k — PCI devices and the driver in use
  • lsusb — USB devices
  • journalctl -k -b -p warning — kernel warnings this boot

Verify in this order

kernel state → exposed as /proc files → read by tools → tunables written via sysctl

Where it usually breaks

First mismatch in hardware/kernel capability → scheduler/mm/device → cgroup/namespace → process/thread → service/runtime → workload behavior/counters; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2841

Confirmation

Confirm action

Continue?