Home arrow Site Administration arrow Page 9 - Kernel, Cron, and User Administration, Part 1

Other RHEL 3 Kernels - Administration

Today, get started with your RHCE certification. Learn about shell configuration files, setting up and managing disk quotas, and the basics of the kernel. This comes from chapter five of Red Hat Certified Engineer Linux Study Guide (Exam RH302), fourth edition, by Michael Jang. (McGraw-Hill/Osborne, 2004, ISBN: 0-07-225365-7).

TABLE OF CONTENTS:
  1. Kernel, Cron, and User Administration, Part 1
  2. Certification Objective: Shell Configuration Files
  3. Setting Up and Managing Disk Quotas
  4. The Quota Package
  5. Quota Management Commands
  6. Automating Quota Settings
  7. The Basics of the Kernel
  8. Kernel Concepts
  9. Other RHEL 3 Kernels
  10. Understanding Kernel Modules
  11. /lib/modules/kernel_version/ Directory Structure
By: McGraw-Hill/Osborne
Rating: starstarstarstarstar / 11
August 25, 2004

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

There are a number of different kernels included with the RHEL 3 installation files. You can and should install the kernel best suited to your system. I briefly describe available RHEL 3 kernels in Table 5-1. The ďELĒ in each of these kernels refers to their customization for Red Hat Enterprise Linux. The version numbers shown is what was released with RHEL 3. If youíve used the Red Hat update agent, your kernel version number may vary.

Table 5-1 Available Red Hat Enterprise Linux 3 Kernels (and Related Packages)

Kernel RPM Description
kernel-2.4.21-4.EL.athlon.rpm Suitable for PCs with a single AMD Athlon CPU.
kernel-2.4.21-4.EL.i686.rpm Designed for PCs with a single Intel CPU.
kernel-unsupported-2.4.21-4.EL.athlon.rpm The Athlon kernel with additional unsupported modules.
kernel-unsupported-2.4.21-4.EL.i686.rpm The Intel kernel with additional unsupported modules.
kernel-BOOT-2.4.21-4.EL.i386.rpm Kernel used only during the RHEL 3 installation process.
kernel-hugemem-2.4.21-4.EL.i686.rpm Supports multiple CPUs and systems with more than 4GB of RAM.
kernel-hugemem-unsupported-2.4.21-4.EL.i686.rpm The hugemem kernel configured with additional untested kernel modules.
kernel-pcmcia-cs-3.1.31-13.i386.rpm Adds PCMCIA (PC Card) modules to your current kernel.
kernel-smp-2.4.21-4.EL.athlon.rpm The symmetric multiprocessing (SMP) kernel suitable for multi-CPU AMD Athlon systems. Also supports more than 4GB of RAM.
kernel-smp-2.4.21-4.EL.i386.rpm The symmetric multiprocessing (SMP) kernel suitable for multi-CPU Intel systems. Also supports more than 4GB of RAM.
kernel-smp-unsupported-2.4.21-4.EL.athlon.rpm The SMP kernel with additional untested kernel modules for Athlon CPUs.
kernel-smp-unsupported-2.4.21-4.EL.i386.rpm The SMP kernel with additional untested kernel modules for Intel CPUs.
kernel-source-2.4.21-4.EL.i386.rpm Includes the source code for the RHEL 3 kernel.

This is just a short list of kernels available for RHEL 3. As the Red Hat exams assume the use of standard PCs with a single CPU, Iíve limited the list in Table 5-1 to such kernels. For more information on RHEL 3 kernels available for multi-CPU or higher-end CPUs, refer to the RHEL 3 documentation available online from http://www.redhat.com/docs/manuals/enterprise/.

The /boot Partition

The Linux kernel is stored in the partition with the /boot directory. New kernels must also be transferred to this directory. By default, RHEL 3 configures a partition of about 100MB for this directory. This provides enough room for your current kernel plus several additional upgraded kernels.

The /proc Filesystem

The /proc directory is based on a virtual filesystem; in other words, it does not include any files that are stored on the hard drive. But it is a window into what the kernel sees of your computer. Itís a good idea to study the files and directories in /proc, as it can helpyou diagnose a wide range of problems. Figure 5-6 shows the /proc from a typical RHEL 3 computer.

[root@Enterprise3 root]# \ls /proc/
1    1880 1950 2159 2245 2762    devices     ksyms      stat
1175 1903 1960 2170 2246 3       dma         loadavg    swaps
1182 1907 1969 2171 2254 4       driver      locks      sys
16   1908 1999 2174 2256 5       execdomains mdstat     sysrq-trigger
1655 1909 2    2191 2261 6       fb          meminfo    sysvipc
1659 1910 2008 2216 2365 7       filesystems misc       tty
1685 1911 2022 2218 2420 74      fs          modules    uptime
17   1912 2023 2223 2485 8       ide         mounts     version
1704 1913 2024 2230 2586 9       interrupts  mtrr
1772 1914 2025 2234 2655 apm     iomem       net
18   1915 2026 2236 2713 bus     ioports     partitions
1811 1916 2027 2238 2714 cmdline irq         pci
1851 1922 2028 2241 2715 cpuinfo kcore       self
1865 1941 2085 2243 2749 crypto  kmsg        slabinfo

Figure 5-6   A Red Hat Enterprise Linux 3 /proc directory

The numbered items are based on process IDs. For example, the process ID of init is 1. The files in this directory include the memory segments that make up the active process. The contents of each of these files include the active memory for that process.

The other items in the listing are files and directories that correspond to configuration information for components such as DMA channels or whole subsystems such as memory information.

Take a look at some of these files. For example, the /proc/meminfo file provides excellent information as to the state of memory on the local computer, as shown in Figure 5-7. It can help you determine if RHEL 3 is having trouble detecting all of the memory on your computer.

[root@Enterprise3 root]# cat /proc/meminfo
      total:    used:      free:   shared: buffers: cached:
Mem:  128675840 126464000  2211840     0  14028800 63885312
Swap: 394805248 31461376 363343872
Memtotal:       125660 kB
MemFree:          2160 kB
MemShared:           0 kB
Buffers:         13700 kB
Cached:          51304 kB
SwapCached:      11084 kB
Active:          87704 kB     
ActiveAnon:      49664 kB
ActiveCache:     38040 kB
Inact_dirty:         0 kB
Inact_laundry:   18908 kB
Inact_cleam:      2208 kB
Inact_target:    21764 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       125660 kB
LowFree:          2160 kB
SwapTotal:      385552 kB
SwapFreeL:      354828 kB
HugePages_Total:     0
HugePages_Free:      0
HUgepagessize:    4096 kB
[root@Enterprise3 root]#

Figure 5-7  Detected memory information

It can also help you measure the current memory state of your system. For example, if your system is overloaded, youíll probably find very little free swap space. The HugePage settings are associated with systems with over 4GB of RAM.

Now you can examine how Linux looks at your CPU in the /proc/cpuinfo file, as shown in Figure 5-8. In this particular case, the cpu family information is important; the number 6 in this figure corresponds to a 686 CPU. Some of this information is available through the top utility.

Many programs are available that simply look at the information stored in /proc and interpret it in a more readable format. The top utility is a perfect example. It reads the process table, queries RAM and swap usage and the level of CPU use, and presents it all on one screen.

IP Forwarding

More importantly, there are kernel variables you can alter to change the way the kernel behaves while itís running. Sometimes itís appropriate to configure a Linux computer as a router between networks. By default, it does not forward TCP/IP information. You can confirm it with the following command:

# cat /proc/sys/net/ipv4/ip_forward
0

If your computer has two or more network cards, you may want to activate IPforwarding with the following command:

# echo 1 >> /proc/sys/net/ipv4/ip_forward
# cat /proc/sys/net/ipv4/ip_forward
1

Kernel Cron and User Administration

Detected CPU information

Preventing the Ping of Death

The following is another useful change to a proc kernel variable, which enables the use of TCP SYN packet cookies. These cookies prevent SYN flood attacks on your system, including the so-called ďping of death.Ē

# echo 1 >> /proc/sys/net/ipv4/tcp_syncookies

Managing /proc Graphically

There is a Red Hat graphical tool that you can use to manage /proc directories. Itís known as the Kernel Tuning tool, which you can start from a GUI command line with the redhat-config-proc command. For example, you can use it to set up IP Forwarding, as shown in Figure 5-9.

Kernel Cron and User Administration

FIGURE 5-9  Tuning the kernel through /proc

This is part one from the fifth chapter of Red Hat Certified Engineer Linux Study Guide (Exam RH302), fourth edition, by Michael Jang. (McGraw-Hill/Osborne, 2004, ISBN: 0-07-225365-7). Check it out at your favorite bookstore today. Buy this book now.



 
 
>>> More Site Administration Articles          >>> More By McGraw-Hill/Osborne
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

SITE ADMINISTRATION ARTICLES

- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: