Reputation: 249
I have used cat /proc/modules
to list the modules details.
Below a module shows as 4 instances are present:
poe_isr 3046 4 - Live 0xc37e1000 (O)
What does it mean? How do I see where these instances are being used?
Next module is showing as 0 instances and Live:
adcmods 1565 0 - Live 0xc37dd000 (P)
What does it mean? The module is not loaded but still Live?
Upvotes: 2
Views: 4409
Reputation: 65928
Not sure why some descriptions (like this one) name the third column of /proc/modules
output as a "number of instances", but this is actually a module's reference count.
If a module has a positive (non-zero) reference count, then it cannot be unloaded with /sbin/rmmod
(the command prints "ERROR: Module X is in use").
If some module's references are obtained by other modules, then a comma-separated list of these modules is printed as 4th column (instead of -
character).
If the module's reference is obtained by non-module "objects", one should use other methods for listing these objects. E.g. a filesystem module is normally referenced by the filesystem's mounts, so one needs to check output of /usr/bin/mount
.
Upvotes: 7