Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 History  





2 Supported buses  





3 Sysfs and userspace  





4 See also  





5 References  





6 External links  














sysfs






Čeština
Deutsch
Español
Français


Norsk bokmål
Português
Русский

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


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.[1] 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/.[2]

History[edit]

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

Sysfs was designed to export the information present in the device tree which would then no longer clutter up procfs. It was written by Patrick Mochel.[3][4] 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[edit]

ACPI
Exports information about ACPI devices.
PCI
Exports information about PCI and PCI Express devices.
PCI Express
Exports information about PCI Express devices.
USB
Exports information about USB devices.
SCSI
Exports information about mass storage devices, including USB, SATA and NVMe interfaces.[7]
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[edit]

Sysfs is used by several utilities to access information about hardware and its driver (kernel modules) such as udevorHAL. Scripts have been written to access information previously obtained via procfs, and some scripts configure device drivers and devices via their attributes.

See also[edit]

References[edit]

  1. ^ 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.
  • External links[edit]


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Sysfs&oldid=1167578761"

    Categories: 
    Free special-purpose file systems
    Interfaces of the Linux kernel
    Linux kernel features
    Pseudo file systems supported by the Linux kernel
    Hidden categories: 
    Articles with short description
    Short description matches Wikidata
     



    This page was last edited on 28 July 2023, at 16:24 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki