Procfs is a special filesystem that enumerates kernel data structures as files. This filesystem serves as a debugging resource for kernel programmers, since it allows users to view the state of data structures through the virtual file interface. Procfs is mounted to the /proc directory (mount point) of rootfs.

Data in procfs files is not persistent, and is always constructed on the run; each file is an interface through which users can trigger associated operations. For instance, a read operation on a proc file invokes the associated read callback function bound to the file entry, and that function is implemented to populate the user buffer with appropriate data.

The number of files enumerated depends on the configuration and architecture ...

Get Mastering Linux Kernel Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.