How to find the list of processes using a particular kernel module?

二次信任 提交于 2019-12-20 17:47:24

问题


When I try to rmmod a module I get the error message "Error: Module in use" , lsmod | grep <module name> shows the count.
Is there a way that would tell me which processes are using this particular kernel module/driver?


回答1:


This was asked before, but there was no great answer, probably because there is no good way to accomplish to find what is using what.

The best suggestion is to dmesg and look for any indication of what loaded the module.

You might also try using the --force parameter to rmmod in case your kernel was built with support for it.




回答2:


lsof /dev/ might help you to find the dependent process.



来源:https://stackoverflow.com/questions/9029526/how-to-find-the-list-of-processes-using-a-particular-kernel-module

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!