Sysfs
sysfs is a pseudo file system provided by the Linux kernel that exports information about various kernel subsystems, hardware devices, and associated device drivers from the kernel's device model to user space through virtual files. In addition to providing information about various devices and kernel subsystems, exported virtual files are also used for their configuration.
sysfs provides functionality similar to the sysctl mechanism found in BSD operating systems, with the difference that sysfs is implemented as a virtual file system instead of being a purpose-built kernel mechanism, and that, in Linux, sysctl configuration parameters are made available at /proc/sys/ as part of procfs, not sysfs which is mounted at /sys/.
History
During the 2.5 development cycle, the Linux driver model was introduced to fix the following shortcomings of version 2.4:- No unified method of representing driver-device relationships existed.
- There was no generic hotplug mechanism.
- procfs was cluttered with non-process information.
During the next year of 2.5 development the infrastructural capabilities of the driver model and driverfs began to prove useful to other subsystems. kobjects were developed to provide a central object management mechanism and driverfs was renamed to sysfs to represent its subsystem agnosticism.
Sysfs is mounted under the mount point. If it is not mounted automatically during initialization, it can be mounted manually using the
mount command: mount -t sysfs sysfs /sys.Supported buses
; ACPI; PCI
; PCI Express
; USB
; SCSI
; S/390 buses