sysfs
sysfs is a
sysfs provides functionality similar to the
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.
Sysfs was designed to export the information present in the
Maneesh Soni later wrote the sysfs backing store patch to reduce memory usage on large systems.During the next year of 2.5 development the infrastructural capabilities of the driver model and driverfs began to prove useful to other subsystems.[5][6] 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 /sys mount point. If it is not mounted automatically during initialization, it can be mounted manually using the mount
command: mount -t sysfs sysfs /sys
.[1]
Supported buses
- ACPI
- Exports information about ACPIdevices.
- PCI
- Exports information about PCI and PCI Express devices.
- PCI Express
- Exports information about PCI Express devices.
- USB
- Exports information about USBdevices.
- SCSI
- Exports information about NVMe interfaces.[7]
- S/390 buses
- As the S/390architecture contains devices not found elsewhere, special buses have been created:
- css: Contains subchannels (currently the only driver provided is for I/O subchannels).
- ccw: Contains channel attached devices (driven by CCWs).
- ccwgroup: Artificial devices, created by the user and consisting of ccw devices. Replaces some of the 2.4 chandev functionality.
- iucv: Artificial devices like netiucv devices which use VM's IUCV interface.
Sysfs and userspace
Sysfs is used by several utilities to access information about hardware and its driver (
See also
References
- ^ a b Patrick Mochel and Mike Murphy. "sysfs - _The_ filesystem for exporting kernel objects". kernel.org.
- ^ SUSE. "sysctl man page". FreeBSD.
sysctl is used to modify kernel parameters at runtime. The parameters available are those listed under /proc/sys/. Procfs is required for sysctl support in Linux. You can use sysctl to both read and write sysctl data.
- ^ Torvalds, Linus (18 October 2002). "Linux v2.5.44 - and offline for a week".
- ^ Torvalds, Linus (4 November 2002). "Linux v2.5.46".
- ^ Mochel, Patrick (17 October 2001). "[RFC] New Driver Model for 2.5".
- ^ Jansen, Tim (1 November 2001). "Re: [PATCH] 2.5 PROPOSAL: Replacement for current /proc of shit".
- ^ "SCSI Interfaces Guide — The Linux Kernel documentation". www.kernel.org. Retrieved 2020-11-13.