How to find the list of processes using a particul

2020-05-31 16:57发布

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?

2条回答
forever°为你锁心
2楼-- · 2020-05-31 17:02

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

查看更多
Root(大扎)
3楼-- · 2020-05-31 17:12

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.

查看更多
登录 后发表回答