World Library  
Flag as Inappropriate
Email this Article

Sysfs

Article Id: WHEBN0002127775
Reproduction Date:

Title: Sysfs  
Author: World Heritage Encyclopedia
Language: English
Subject: Device file, Debugfs, Zram, Zswap, Linux kernel
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Sysfs

sysfs is a virtual file system provided by the Linux kernel. By using virtual files, sysfs exports information about various kernel subsystems, hardware devices and associated device drivers from the kernel's device model to user space. In addition to providing information about various devices and kernel subsystems, exported virtual files are also used for their configuring.

sysfs provides similar functionality as 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.

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.

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 /sys mount point.

Supported buses

PCI
Exports information about PCI devices.
USB
Contains both USB devices and USB hosts. USB core is also very important.
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

  • Driver model overview from the LWN porting to 2.6 series
  • kobjects and sysfs from the LWN porting to 2.6 series
  • Ramfs
  • The sysfs Filesystem, OLS'05
  • Documentation/filesystems/sysfs.txt Linux kernel documentation for sysfs
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.