美文网首页
sysfs 2022-12-14

sysfs 2022-12-14

作者: 9_SooHyun | 来源:发表于2022-12-14 16:08 被阅读0次

sysfs

In addition to /proc, the kernel also exports information to another virtual file system called sysfs.
sysfs is used by programs such as udev to access device and device driver information.

/sys/class

This directory contains every device class registered with the kernel. Device classes describe a functional type of device. Examples include input devices, network devices, and block devices.

Difference between /dev and /sys/class

The files in /dev are actual devices files which UDEV creates at run time.
The directory /sys/class is exported by the kernel at run time, exposing the hierarchy of the hardware through sysfs.

/sys/class/net

Each of the entries in this directory is a symbolic link representing one of the real or virtual networking devices that are visible in the network namespace of the process that is accessing the directory.
Each of these symbolic links refers to entries in the /sys/devices directory.

相关文章

网友评论

      本文标题:sysfs 2022-12-14

      本文链接:https://www.haomeiwen.com/subject/ovbhqdtx.html