![]() ![]() You can also run the following to see the current list of parameters passed to only the built-in modules: (This file might not exist on older kernels and even if it does the data returned it's not very readable, so the above command is usually preferred)Ĭat /lib/modules/`uname -r`/Īlternatively, you can always use the modinfo binary to see any module's list of parameters: (MOD_NAME needs to be replaced with the name of the module) The following command should list every currently loaded/compiled module along with the list of parameters that have already been passed to that module: (You need to install the "tree" command before being able to run this command)įind /sys/module/ -type d -name "parameters" -print | xargs tree -a -CA Most modules' default set of options do usually suffice for most systems, but occasionally we might need to pass a different set of parameters to a module to achieve a certain task. Linux Kernel's highly modular design guarantees that each module has its own set of options and parameters that can be passed to the module at different stages of that module integration into the kernel and these parameters modify its behavior of that module. How To See The Current Parameters Passed To A Module? Here is one way to find the list of built-in modules:Īwk -F"/" '' cut -d " " -f1 /proc/modules lsmod | cut -d " " -f1 There are different ways to obtain this information. Which Modules Have Been Compiled Into The Kernel? There are two ways to do this we can do this at the compile-time while we are building the kernel from the source, or we can dynamically load a module into the kernel source code at the run-time (One of the most interesting features of the Linux kernel), so in a way modules that are actually utilized have either been compiledor loaded into the kernel and for the purposes of this guide this distinction is important. To utilize a particular kernel module we must add the module source code to the kernel. There are usually a handful of modules that are utilized by a running kernel, the rest are practically never added to the kernel and naturally never used. However, not all of these modules are used in a normal system. That means that there are many kernel modules in a normal kernel source tree/installation. Nevertheless, the numbers that you will see are large and usually more than a few thousand. ![]() Grep =m /usr/src/kernels/`uname -r`/.config | wc -lĭepending on what version of the Linux kernel you have and how you have built or installed it, you might get very different numbers from each of the above commands. ![]() You can run one of these commands to get an idea of how many different modules there are in the particular kernel version available on your system:įind /lib/modules/`uname -r`/kernel -type f \( -name "*.xz" -o -name "*.ko" \) | wc -l There are also the so-called "out-of-tree" modules that have not yet been added to the kernel official source code but are, more or less, compatible with the kernel and theoretically can be added to the kernel source either dynamically at the run-time or build into the kernel source code at the compile time. ![]() There are many kernel modules that are shipped with the kernel source code and also components that can be added to the kernel as a module. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |