简体   繁体   中英

How to get use count from Linux kernel module?

I have a problem with use count of kernel module being developed.I'd like to print it for debugging purpose. How can I obtain it from the module code?

Kernel version in question - Linux 2.6.32

module_refcount()将为您提供传递的模块的使用计数。

/sbin/lsmod

The third column will be the number of usages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM