Penguin
Annotated edit history of SysFs version 12, including all changes. View license author blame.
Rev Author # Line
8 AristotlePagaltzis 1 <tt>sysfs</tt> is a pseudo FileSystem that the LinuxKernel uses to export runtime configuration and statistics from drivers into userspace. By [LSB] convention it's mounted on <tt>/sys</tt>.
1 JamieCurtis 2
8 AristotlePagaltzis 3 Note that some kernel options are still configured through <tt>/proc/sys</tt> (or equivalently using <tt>sysctl</tt>, which is also called at boot time to read <tt>/etc/sysctl.conf</tt>). A general rule of thumb is that if the kernel option is related directly to some piece of hardware, it's probably configured via <tt>sysfs</tt> (eg. [NIC] settings such as [MTU]), and if it has to do with other kernel behaviour (eg. network [Protocol] settings), it'll be accessable via <tt>/proc/sys</tt>. Other examples for things you tweak via <tt>sysfs</tt> include [RAID], [SCSI] and other BlockDevice configuration such as [IO schedulers | LinuxIoScheduler].
1 JamieCurtis 4
8 AristotlePagaltzis 5 The [sysfsutils | http://linux-diag.sourceforge.net/Sysfsutils.html] contain a library and a CommandLine tool called <tt>systool</tt> to explore <tt>/sys</tt> and display and alter current settings. The corresponding [Debian] [Package] also uses this tool to provide boot time configuration of SysFs values through the <tt>/etc/sysfs.conf</tt> file.
9 IanMcDonald 6
7 Parts of SysFs are being deprecated. For example see http://lkml.org/lkml/2007/3/5/427 - this is one of several messages I've seen around different areas of SysFs and to me it seems like SysFs is losing favour -- opinion of IanMcDonald
10 LawrenceDoliveiro 8
12 LawrenceDoliveiro 9 The above message clearly refers to _parts_ of sysfs that it is now considered should not have been included. The _rationale_ for the existence of sysfs--as the preferred userspace-visible representation of information the kernel has about hardware--still remains, with no signs of any plans to make this information available in any other form. This information was moved out of ProcFs because the latter was simply turning into a dumping ground for information that had nothing to do with processes.
10
11 See also [this LKML discussion|http://kerneltrap.org/Linux/Sysfs_Stability] about current sysfs maintenance issues.
12
13 -- LawrenceDoliveiro
2 PerryLorier 14
15 ----
8 AristotlePagaltzis 16 CategorySystemAdministration