Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a definitieve resource that documents navigation of the linux /proc and /sys filesystems?

We use the /proc and /sys file systems in Linux to discover various types of system configuration information. Typically, we spelunk around through the different files and directories until we find the information that we need.

I'm wondering if anyone knows of a definitive resource that documents how one would navigate through the /proc and /sys file systems to locate specific information. We primarily grab USB, PCI and SCSI information from various files in these file systems.

Thanks,

like image 751
Steve Hawkins Avatar asked Jul 09 '09 18:07

Steve Hawkins


People also ask

What is proc for in Linux?

Proc file system (procfs) is virtual file system created on fly when system boots and is dissolved at time of system shut down. It contains useful information about the processes that are currently running, it is regarded as control and information center for kernel.

In which directory does the Linux kernel store the information about the processes present?

The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID).

What is proc folder Linux?

The /proc/ directory (also called the proc file system) contains a hierarchy of special files which represent the current state of the kernel, allowing applications and users to peer into the kernel's view of the system.

What is proc PID root?

/proc/PID/maps: It is a text file including details about mapped blocks and files (such as stack and heap). /proc/PID/root: It is a symlink to a root path as checked by a process. It is a link to the / directory for most of the processes unless a process is executing in a chroot jail.


1 Answers

The definitive resource for /sys is Documentation/sysfs-rules.txt. The definitive resource for /proc/sys is Documentation/sysctl/. The definitive resource for the rest of /proc appears to be Documentation/filesystems/proc.txt. The rest of the Documentation/ directory in the Linux kernel source has other interesting information. In particular, Documentation/ABI/ mentions the stability of each interface.

like image 177
CesarB Avatar answered Sep 21 '22 20:09

CesarB