How to view information about Linux loading built-in modules

  
                

With the upgrade of hardware devices, in order to support these hardware, the update speed of the Linux system kernel is getting faster and faster, and it also causes the bloat of the Linux kernel. Installing the built-in module can effectively solve this problem. So how do you view the information about the built-in modules installed on your Linux system?

The latest Linux distribution kernels only have a relatively small "built-in modules", and the rest of the specific hardware drivers or custom functions as "loadable modules" Let you choose to load or unload.

Built-in modules are statically compiled into the kernel. Unlike loadable kernel modules, you can dynamically load, unload, and query modules using commands such as modprobe, insmod, rmmod, modinfo, or lsmod. The built-in modules are always loaded into the kernel at startup and are not managed by these commands.

First, find out the list of built-in modules

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

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

You can also use the following command to see what built-in modules:
< Br>

Second, find the built-in module parameters

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

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 subdirectories named by kernel modules (both built-in and loadable). Go to each module directory, there is a directory of "parameters", which lists all the parameters of this module.

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

$ ls /sys/module/tcp_cubic/parameters

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

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

Linux is more information see the method of the built-in modules, so that we can know what Linux installed built-in module It is also possible to delete unused modules and reduce the burden on the system.

Copyright © Windows knowledge All Rights Reserved