12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 21Monitoring and Tuningthe KernelThe previous chapter, “Monitoring System Resources,”details how to monitor filesystems, system processes, CPUutilization, physical and virtual memory, and the networksubsystem. This chapter dives even deeper into the systemby discussing the monitoring and tuning of the kernelincluding how it manages memory, how it assignsprocesses to each processor in a multi-processor system,and how to gather information from the kernel when thesystem appears to be unresponsive.IN THIS CHAPTER. Using the /proc Directory. Optimizing Virtual Memory. Managing Memory with NUMA. Using AltSysRq to ExecuteSystem Requests. Saving Kernel Dumps forAnalysis. Setting SMP IRQ Affinity. Enabling NMI Watchdog forLocked SystemsUsing the /proc DirectoryInstead of executing utilities such as free and top to determinethe status of system resources or fdisk to view diskpartitions, an administrator can gather system informationdirectly from the kernel through the /proc filesystem.The /proc directory can be thought of as a window intowhat the kernel sees on the system. Even though the directoryappears to contain files and directories, they are notordinary files. You will notice that most of them are 0bytes. You will also notice that it is mounted as a pseudofilesystemin /etc/fstab:proc /proc proc defaults 0 0When you view the contents of files in /proc, you are reallyasking the kernel what the current state is for that particulardevice or subsystem. To view the contents of a special file in/proc, use the cat, less, or more file viewing utilities.For example, the cat /proc/meminfo command displays thecurrent state of the system memory as shown in Listing 21.1.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!