Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对正在开发的内核模块的使用计数有疑问。我想打印它以进行调试。如何从模块代码中获取它?
有问题的内核版本 - Linux 2.6.32
module_refcount()会给你传递的模块的使用计数。
module_refcount()
/sbin/lsmod
第三列将是使用次数。