Linux – Proc File system – Part 1

The Proc file system is interesting in the sense it provides information on various processes and kernel data structures dynamically. It is loaded at boot time to a mount point termed “/proc”. The proc filesystem is a pseudo/virtual file system. If you check the file size of any file in the /proc directory – the size will be zero.

The proc file system provides access to various kernel structures to pull data about the Linux kernel and system under operation. Each folder or file provides data about a specific parameter/process in the Linux OS. The below image shows a capture of the “/proc” file system.

Each numbered folder represents a process identifier (PID) of a particular process and contains details of the process. Other files in the folder (for e.g. meminfo/version/vmstat etc) provide details of the Linux system. The file size of each directory and file is zero except perhaps kcore – which is also a virtual file representing the physical memory of the system (is a mystery file for me 🙂  as it seems to represent a value greater than the physical memory). A snapshot is provided below.

For details on the various virtual files in the “/proc” folder and the explanation for the elements – refer the link below

https://man7.org/linux/man-pages/man5/proc.5.html

The next article, we will look further at some of the “/proc” files.

Linux – Proc File system – Part 2 

Comments

  1. Pingback: Passing Data to a kernel module – module_param | Hitch Hiker's Guide to Learning

  2. Pingback: Linux – Proc File system – Part 2 | Hitch Hiker's Guide to Learning

Leave a Reply

Your email address will not be published. Required fields are marked *