Is there a way to figure out what is using a Linux

2019-01-21 01:10发布

If I load a kernel module and list the loaded modules with lsmod, I can get the "use count" of the module (number of other modules with a reference to the module). Is there a way to figure out what is using a module, though?

The issue is that a module I am developing insists its use count is 1 and thus I cannot use rmmod to unload it, but its "by" column is empty. This means that every time I want to re-compile and re-load the module, I have to reboot the machine (or, at least, I can't figure out any other way to unload it).

7条回答
可以哭但决不认输i
2楼-- · 2019-01-21 02:01

You might try lsof or fuser.

查看更多
登录 后发表回答