Notes on /proc and /sys

Under the Filesystem Heirarchy Standard,  is a directories that mounts a procfs filesystem. In newer kernels, the functions of  are being superseded by , which uses the sysfs filesystem. These filesystems are designed to offer information about current processes, drivers, and devices running on the operating system and enable some configuration of the host operating system.

Getting information from
The following are some files under  I find to occasionally be useful.

Hardware Information

 * A detailed listing of the processor(s) model, speed, cache sizes, flags, and more. Corresponds to
 * A detailed listing of the processor(s) model, speed, cache sizes, flags, and more. Corresponds to


 * A verbose report on the system's memory. Corresponds to
 * A verbose report on the system's memory. Corresponds to


 * Directories named after batteries known to the system, with files detailing information and their current state. Corresponds to
 * Directories named after batteries known to the system, with files detailing information and their current state. Corresponds to


 * A listing of the RAID devices known to the system and their current state. Corresponds to
 * A listing of the RAID devices known to the system and their current state. Corresponds to


 * A listing of all disk drives, their type, and which bus they reside on (including optical drives, or drives connected through external interfaces such as USB)
 * A listing of all disk drives, their type, and which bus they reside on (including optical drives, or drives connected through external interfaces such as USB)

System Information

 * Load average numbers on the system. Corresponds to
 * Load average numbers on the system. Corresponds to


 * Time since the system was booted. Corresponds to , and the kernel parameter
 * Time since the system was booted. Corresponds to , and the kernel parameter


 * A listing of currently mounted devices and filesystems. Corresponds to
 * A listing of currently mounted devices and filesystems. Corresponds to


 * A listing of the devices, their partitions and number of blocks used known to the operating system
 * A listing of the devices, their partitions and number of blocks used known to the operating system


 * A listing of all swap partitions available to the system
 * A listing of all swap partitions available to the system


 * A dump of the system's current memory. There is much evil fun to be had here.
 * A dump of the system's current memory. There is much evil fun to be had here.


 * A listing of all environmental variables. Corresponds to
 * A listing of all environmental variables. Corresponds to


 * A list of all modules currently loaded in the kernel. Corresponds to
 * A list of all modules currently loaded in the kernel. Corresponds to

System Configuration

 * Prints the system's domain name, if any. Corresponds to , and
 * Prints the system's domain name, if any. Corresponds to , and


 * Prints the system's host name, if any. Corresponds to , and
 * Prints the system's host name, if any. Corresponds to , and


 * Returns either a  or a
 * indicates that the key sequence will be captured by init and initiate a graceful shutdown
 * indicates that the key sequence will not be captured, and will shutdown as though you had yanked the power plug
 * indicates that the key sequence will not be captured, and will shutdown as though you had yanked the power plug


 * A non-zero integer indicates that SysRq key sequences will be acknowledged.
 * A non-zero integer indicates that SysRq key sequences will be acknowledged.