Three ways to view Linux kernel module dependencies __linux

Source: Internet
Author: User

Take Ip_tables.ko-dependent X_tables.ko as an example:

1, lsmod command

$ lsmod 
Module                  Size  Used by
iptable_filter          1790  1 
ip_tables               7706  1 iptable_ Filter
x_tables                8327  1 ip_tables
vmhgfs                 41755  0 
vsock                  30939  


2. View MODULES.DEP Files


$ cat/lib/modules/2.6.32-5-686/modules.dep ... 
.
Kernel/net/ipv4/netfilter/ip_tables.ko:kernel/net/netfilter/x_tables.ko
Kernel/net/ipv4/netfilter/iptable_ Filter.ko:kernel/net/ipv4/netfilter/ip_tables.ko Kernel/net/netfilter/x_tables.ko
Kernel/net/ipv4/netfilter /iptable_mangle.ko:kernel/net/ipv4/netfilter/ip_tables.ko Kernel/net/netfilter/x_tables.ko
kernel/net/ipv4/ Netfilter/iptable_nat.ko:kernel/net/ipv4/netfilter/ip_tables.ko Kernel/net/ipv4/netfilter/nf_nat.ko kernel/net/ Netfilter/x_tables.ko Kernel/net/ipv4/netfilter/nf_conntrack_ipv4.ko Kernel/net/netfilter/nf_conntrack.ko kernel/ Net/ipv4/netfilter/nf_defrag_ipv4.ko .....

3, Modinfo command
$/sbin/modinfo ip_tables 
filename:/lib/modules/2.6.32-5-686/kernel/net/ipv4/netfilter/ip_tables.ko
Description:ipv4 packet filter
author:netfilter Core team 
LICENSE:GPL
depends:x_t Ables
vermagic:2.6.32-5-686 SMP mod_unload modversions 686

This command reads the MODULES.DEP file to obtain a dependency
Original address: http://xmodulo.com/how-to-check-kernel-module-dependencies-on-linux.html


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.