Linux kernel: /proc and /sys

When booting up, the kernel starts up a pseudo file system called /proc in which it dumps the information compiled on the machine, as well as many other internal data,during the execution.

The /proc directory is implemented on memory and not saved to disk. The contained data are both static and dynamic (they vary during execution).

Interesting points –
1. We can find the images of processes that are being executed in the /proc directory.Each of the system’s processes can be found in the /proc/ directory where there’s a directory with files that represent it’s state. This information is basic for debugging programs or the systems own commands such as “ps” or “top” which can use it for seeing the state of the processes.

View of important files –

Files under /proc containing important information

Files under /proc containing important information

As of kernel version 2.6, a progressive transition of procfs (/proc) to sysfs (/sys) has begun, in order to migrate all the information that is not related to the processes especially the devices and their drivers (modules of the kernel) to the /sys system

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s