开发者

How to list all the processes which are using/accessing a given Linux kernel driver

Is there any way to list all the processes which are using/accessing a given Linux kernel driver?

I've got a (framebuffer) driver which I'm trying to rmmod, however the system is returning Module is in use, and I'd like to get to the bottom of it and see what process is still using it.

Can we get first the file descriptors that're been at开发者_JAVA百科tributed by the system for interaction w/ the driver, then from there lookup the processes that own them?

-Ilyes Gouta


If the device is /dev/fb0, then lsof /dev/fb0 should list the processes with it open.

It might also be held open by another kernel module - you can check that with lsmod.


You can use "lsof" to see which processes are accessing a special file (e.g. /dev/fb0 or something).

However, this isn't guaranteed to work for all types of driver, some have kernel things which rely on them which aren't viewable with /dev/fb0.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜