How to get a list of built-in modules and device drivers for Linux systems

Source: Internet
Author: User

Question: I want to know what modules are built into the kernel in the Linux system and what parameters each module has. Is there a way to get a list of built-in modules and device drivers, along with their detailed information?

The modern Linux kernel is growing rapidly over time to support a large number of hardware, file systems, and network functions. During this time, the introduction of the Loadable module (loadable kernel modules,[lkm]) prevents the kernel from becoming bloated, as well as the flexibility to extend functionality and hardware support in different environments without rebuilding the kernel.

The kernel of the latest Linux distributions comes with a relatively small "built-in module" (built-in modules), with the rest of the specific hardware drivers or custom features as "loadable modules" that allow you to load or unload selectively.

Built-in modules are statically compiled into the kernel. Unlike loadable kernel modules that can dynamically load, unload, and query modules using commands such as Modprobe, Insmod, Rmmod, Modinfo, or lsmod, built-in modules are always loaded into the kernel at startup and are not managed by these commands.

Find the list of built-in modules

To get a list of the built-in modules, run the following command.

The code is as follows:

$ cat/lib/modules/$ (uname-r)/modules.builtin

You can also use the following command to see what built-in modules are:

Find the built-in module parameters

Each kernel module has a series of parameters, either built-in or loadable. For loadable modules, the Modinfo command can display their parameter information. However, this command is not available for built-in modules. You will get the following error.

The code is as follows:

Modinfo:ERROR:Module XXXXXX not found.

If you want to see the parameters of the built-in modules and their values, you can check their contents under/sys/module.

In the/sys/module directory, you can find the kernel module (which contains both built-in and loadable) named subdirectories. into each module directory, here is a "parameters" directory, listing all the parameters of this module.

For example, you need to find out the parameters of the Tcp_cubic (kernel default TCP implementation) module. You can do this:

The code is as follows:

$ ls/sys/module/tcp_cubic/parameters

Then read the file to see the value of each parameter.

The code is as follows:

$ cat/sys/module/tcp_cubic/parameters/tcp_friendliness

This article is introduced to this, I believe you now must know how to get the Linux system's built-in modules and device driver list, I hope you like this 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.