【问题标题】:How can i get the list of all initialized device drivers in a running Linux kernel?如何获取正在运行的 Linux 内核中所有已初始化设备驱动程序的列表?
【发布时间】:2015-02-14 18:42:26
【问题描述】:

如何获取正在运行的 Linux 内核中所有已初始化设备驱动程序的列表?

请注意,设备驱动程序与模块不同。

有一个相关问题:How can I get a list of all the active kernel drivers on my Android system?

【问题讨论】:

  • Lsmod -k 怎么样?

标签: linux linux-kernel device-driver


【解决方案1】:

每个设备驱动程序都连接到某个总线,并且每个总线在 sysfs 中都有一个“驱动程序”目录,因此类似于以下 shell 命令的内容将打印每个总线及其注册的驱动程序

cd /sys/bus; for bus in $(ls); do echo $bus; ls -1 $bus/drivers; echo; done

样本输出:

scsi
sd
sr

sdio

serio
atkbd
psmouse
serio_raw

【讨论】:

  • 我喜欢这个答案,我需要检查它的有效性...您能否将您的命令输出包含在您的系统中?只是为了比较......
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-02-02
  • 2017-03-02
  • 2010-09-15
  • 2023-03-28
  • 1970-01-01
  • 2011-05-28
相关资源
最近更新 更多