Contents of proc

Although the size of the proc filesystem varies from system to system (different data are exported depending on hardware configuration, and different architectures affect its contents) it nevertheless contains a large number of deeply nested directories, files, and links. However, this wealth of information can be grouped into a few larger categories:

□ Memory management

□ Characteristic data of system processes

□ Filesystems

□ Device drivers

□ System buses

□ Power management

□ Terminals

□ System control parameters

Some of these categories are very different in nature (and the above list is by no means comprehensive) and share few common features. In the past, this information overload was a latent but ever-present source of criticism (which occasionally erupted violently) of the proc filesystem concept. It may well be useful to provide data by means of a virtual filesystem, but a more structured approach would have been appreciated ... .

The trend in kernel development is away from the provision of information by the proc filesystem and toward the exporting of data by a problem-specific but likewise virtual filesystem. A good example of this is the USB filesystem which is used to export many types of status information on the USB subsystem into userspace without "overburdening" /proc with new entries. Additionally, the Sysfs filesystem allows for presenting a hierarchical view not only of the device tree (by device, I mean system buses, PCI devices, CPUs, etc.), but also of important kernel objects. Sysfs is discussed in Section 10.3.

On the kernel mailing list, the addition of new entries to /proc is viewed with deep suspicion and is the subject of controversial discussion. New code has a far better chance of finding its way into the sources if it does not use /proc. Of course, this does not mean that the proc filesystem will gradually become superfluous. In fact, the opposite is true. Today, /proc is as important as ever not only when installing new distributions, but also to support (automated) system administration.

The following sections give a brief overview of the various files in /proc and the information they contain. Again, I lay no claim to completeness and discuss only the most important elements found on all supported architectures.

Continue reading here: Process Specific Data

Was this article helpful?

0 0