LJ Archive

sysfs

sysfs is a new virtual filesystem in the 2.5 kernel that shows all of the driver, bus and class information for devices presently in the system. It also shows a lot of other information not directly related to drivers, including all of the filesystem types, all block devices, the CPU information and even a list of firmware primitives presently in the system. Over time, most of the information in the /proc filesystem that does not have to do with processes, which is what /proc started out for, has been or will be converted and moved into sysfs.

The advantages of sysfs over procfs are:

sysfs should be mounted at /sys in the system, which can be done from the command line by running the following statement as root:

mount -t sysfs none /sys

To have it always be mounted by the system at boot time, the following line should be added to the /etc/fstab file:

none /sys sysfs defaults 0 0

I recommend poking around the deep directory tree in sysfs to try to get a better understanding of the different devices in the system and their relationship to each other.

LJ Archive