Linux how to adjust and maintain the kernel detailed introduction

Source: Internet
Author: User

As an interface between user programs and system hardware, the kernel plays an important role in ensuring that red Hat Enterprise Linux is applied to a wide range of physical and virtual hardware environments.

Identify the running kernel:

1. Cat/etc/redhat-release installed red Hat Enterprise Linux version

2. Uname-r currently running kernel version

3. Yum List installed kernel* installed kernel version

4. Uname-m or arch currently running processor architecture

5.UNAME-A View kernel Information

Sometimes the kernel emits log messages. These messages are recorded in the/var/log/messages file and marked as kernel services.

Kernel modules:

Module loading and unloading

The core kernel image loaded at boot time is located in/boot/vmlinuz-version.

Although you can install multiple kernels, only one is the currently running kernel. To change the kernel, you must reboot the system.

Each kernel contains a set of dynamically loaded modules that are compatible with the kernel and remain in/lib/modules/version/.

Typically, modules are loaded and unloaded as needed without user (or administrator) interaction.

You can use Lsmod to list the currently loaded modules.

Sometimes, you may need to load the module manually using Modprobe modulename.

You can use Modprobe-r modulename to remove modules that are no longer in use.

can view kernel module information in the/lib/modules/2.6.32-71.el6.x86_64/kernel directory

MODPROBE-L lists the modules that are loaded

Example:

# Modprobe-l | grep nf_conntrack_ftp

# modprobe Nf_conntrack_ftp

# Lsmod | grep nf_conntrack_ftp

# modprobe-r Nf_conntrack_ftp

Kernel update:

Download new kernel RPM package

Theoretically, you should use the RPM-UVH kernel-name.rpm but if you use u it will cause the currently running system to hang out.

So the new installation kernel with RPM-IVH kernel-name.rpm

A new kernel will appear in the/boot

In/boot/grub/grub.conf, default=0 represents the use of the new kernel, which requires a reboot to use the new kernel.

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.