What services does the Kernel provide and how to set the kernel?

Source: Internet
Author: User
Article Title: What services does the Kernel provide and how to set the kernel. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

I. Introduction to the kernel module (which components are contained in the kernel)

1. Many components in the Kernel can be combined into a dynamic loading mode. These components are the kernel module.

· The Kernel module is plug-in on the Kernel. In this way, the Kernel function can be added, but the Kernel size will not be increased. The Kernel module has two functions:

(1) drivers for computer peripheral devices;

(2) provide some additional file systems;

· When loading the Kernel module, you can set the Kernel module;

2. storage location of/lib/modules Kernel module;

3. To control the module, run the following command:

Lsmod lists the modules currently loaded;

Modprobe can temporarily load a module;

Syntax: modprobe <械模块的名称>

4. If a module without a Redhat visa is added to the kernel, Redhat will not provide any technical support.

2. describes how to set the modules in the Kernel.

1. To view the information of a module and who signed the authorization form, use the following command:

Format:/sbin/modinfo Module name

2. Module setting: You can set the module through the/etc/modprobe. conf file. You can set the following options:

· Aliases: the drivers used by the NIC, sound card, and USB controller are recorded by default;

· Set Kernel Parameters

· Actions: used to set the actions to be performed when the module is loaded;

3. Some modules call the functions provided by other modules to apply them to themselves. This is the dependency of modules;

· Module dependencies are recorded in the/lib/modules directory. The modules. dep file in the subdirectory corresponding to each module;

· You can use the depmod command to add the "-a" parameter to view the dependencies of all modules;

4. The insmod command can be used to load a module. The function is the same as that of modprobe, but the dependency of modules can be loaded simultaneously when The modprobe module is loaded.

Format: insmod Module name (used to load the specified module)

Rmmode Module name (delete a specified module)

Iii. Introduction/proc virtual directory

1./proc does not exist in the hard disk, but is a virtual directory. We can change the kernel parameters in an emergency by modifying the files in the directory, the/proc directory contains the currently used kernel information. You can view the current system status through these files.

2. If you list the content in the/proc directory, you will find that the size of all files is zero, but you can still view these files using commands such as cat, less, and more;

For example, cat/proc/cpuinfo can view the current cpu status

3. the kernel information contained in the/proc directory, including the hardware devices, network settings, running programs, and memory usage information in the system;

4./proc also has some subdirectories.

· The/proc/scsi/subdirectory contains information about the SCSI device.

· The/proc/sys/subdirectory contains the kernel parameters;

·/Proc/ /PID is displayed on the screen in the form of digits. These subdirectories contain information about all the execution programs;

5. You can modify the files in the/proc/sys/subdirectory to change the parameters of the currently running kernel in an emergency. Example:

[1] [2] Next page

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.