Re: rmmod resource busy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Apr 8, 2014 at 1:44 AM, ratheesh kannoth <ratheesh.ksz@xxxxxxxxx> wrote:
> When i tried to unload a module, i get following message
>
> " Error: could not remove module tun_module: Resource temporarily unavailable "
>
> 1. How to find  which process is using it ?

Kernel reports which module is using it.

For processes... it's not as easy. If there's a device node, you could
search for the processes with that node opened. Example:

└ ~ ➤ lsmod | grep drm
drm_kms_helper         35710  1 i915
drm                   239102  5 i915,drm_kms_helper
i2c_core               24760  6
drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit,videodev

└ ~ ➤ lsof /dev/dri/card0
COMMAND     PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
gnome-she   589 lucas  mem    CHR  226,0          8096 /dev/dri/card0
gnome-she   589 lucas    9u   CHR  226,0      0t0 8096 /dev/dri/card0
chromium  22801 lucas  mem    CHR  226,0          8096 /dev/dri/card0
chromium  22801 lucas   11u   CHR  226,0      0t0 8096 /dev/dri/card0
chromium  22805 lucas   11u   CHR  226,0      0t0 8096 /dev/dri/card0


--
Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux