Sysfs

Sysfs

Sysfs is a virtual file system provided by Linux 2.6. Sysfs exports information about devices and drivers from the kernel device model to user space, and is also used for configuration. It is similar to the sysctl mechanism found in BSD systems, but implemented as a file system instead of a separate mechanism.

Contents

History

During the 2.5 development cycle, the Linux driver model was introduced to fix several shortcomings of version 2.4:

  • No unified method of representing driver-device relationships existed.
  • There was no generic hotplug mechanism.
  • procfs was cluttered with lots of non-process information.

Sysfs is designed to export the information present in the device tree which would then no longer clutter up procfs. It was written by Patrick Mochel. Maneesh Soni later wrote the sysfs backing store patch to reduce memory usage on large systems.

sysfs is an in-memory filesystem that was originally based on ramfs. ramfs was written around the time Linux 2.4.0 was being stabilized. It was an exercise in elegance, as it showed just how easy it was to write a simple filesystem using the then-new VFS layer. Because of its simplicity and use of the VFS, it provided a good base from which to derive other in-memory based filesystems.

sysfs was originally called ddfs (Device Driver Filesystem) and was initially created to debug the new driver model as it was being written. Previously, debugging was performed by using procfs to export a device tree, but under urging from Linus Torvalds, it was converted to use a new filesystem based on ramfs. By the time the new driver model was merged into the kernel around 2.5.1, it had changed names to driverfs to be a little more descriptive.

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.

Some buses

PCI

Exports information about PCI devices.

USB

Contains both USB devices and USB hosts.

S/390 buses

As the S/390 architecture 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 (kernel modules) such as udev or HAL. Scripts have been written to access information previously obtained via procfs, and some scripts configure device drivers and devices via their attributes.

See also

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Sysfs — est un système de fichiers virtuel introduit par le noyau Linux 2.6. Sysfs permet d exporter depuis l espace noyau vers l espace utilisateur des informations sur les périphériques du système et leurs pilotes, et est également utilisé pour… …   Wikipédia en Français

  • Sysfs — es un sistema de archivos virtual que proporciona el núcleo Linux v2.6. Sysfs exporta información sobre los dispositivos y sus controladores desde el modelo de dispositivos del núcleo hacia el espacio del usuario, también permite configurar… …   Wikipedia Español

  • Sysfs — виртуальная файловая система в операционной системе GNU/Linux. Экспортирует в пространство пользователя информацию ядра Linux о присутствующих в системе устройствах и драйверах. Впервые появилась в ядре версии 2.6. Необходимость создания была… …   Википедия

  • sysfs — sysfs  виртуальная файловая система в операционной системе Linux. Экспортирует в пространство пользователя информацию ядра Linux о присутствующих в системе устройствах и драйверах. Впервые появилась в ядре версии 2.6. Необходимость создания… …   Википедия

  • Sysfs — es un sistema de archivos virtual que proporciona el núcleo Linux v2.6. Sysfs exporta información sobre los dispositivos y sus controladores desde el modelo de dispositivos del núcleo hacia el espacio del usuario, también permite configurar… …   Enciclopedia Universal

  • Procfs — On many Unix like computer systems, procfs, short for process file system, consists of a pseudo file system (a file system dynamically generated at boot) used to access process information from the kernel. The file system is often mounted at the… …   Wikipedia

  • Configfs — is a RAM based virtual file system provided by the 2.6 Linux kernel[1]. Configfs appears similar to sysfs but they are in fact different and complementary. Configfs is for creating, managing and destroying kernel objects from user space, and… …   Wikipedia

  • Mount — утилита командной строки в UNIX подобных системах. Применяется для монтирования файловых систем. Содержание 1 Использование 1.1 Размонтирование командой umount …   Википедия

  • procfs — (or the proc filesystem) is a special filesystem in UNIX like operating systems that presents information about processes and other system information in a hierarchical file like structure, providing a more convenient and standardized method for… …   Wikipedia

  • mount — утилита командной строки в UNIX подобных системах. Применяется для монтирования файловых систем. Содержание 1 Использование 1.1 Размонтирование командой umount …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”