The proc Filesystem

As mentioned at the beginning of this chapter, the proc filesystem is a virtual filesystem whose information cannot be read by a block device. Information is generated dynamically only when the contents of a file are read.

Using the proc filesystem, information can be obtained on the kernel subsystems (e.g., memory utilization, peripherals attached, etc.) and kernel behavior can be modified without the need to recompile the sources, load modules, or reboot the system. Closely related to this filesystem is the system control mechanism — sysctl for short — which has been frequently referenced in previous chapters. The proc filesystem provides an interface to all options exported using this mechanism, thus allowing parameters to be modified with little effort. No special communication programs need be developed — all that is required is a shell and the standard cat and echo programs.

Usually, the process data filesystem (its full name) is mounted in /proc, from which it obviously derives its more frequently used abbreviated name (procFS). Nevertheless, it is worth noting that the filesystem — like any other filesystem — can be mounted at any other point in the file tree, although this would be unusual.

The section below describes the layout and contents of the proc filesystem to illustrate its functions and options before we move on to examine its implementation details.

Continue reading here: Contents of proc

Was this article helpful?

0 0