Frequently Asked Question
What is /sys and how does it differ from /proc?
/sys is sysfs, also a virtual filesystem, but its job is to expose the kernel's
device model: a tree of every device, bus, and driver the kernel knows about,
with knobs to inspect and tune them. /sys/class/net/eth0/mtu is the MTU of an
interface; writing to /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
changes the CPU frequency governor.
Roughly: /proc was the original, ad-hoc dumping ground (and is now mostly used
for process info and a few legacy globals), while /sys was introduced in 2.6 as
a structured, per-device tree. Modern device managers like udev watch /sys and
react to add/remove events.