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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

448CHAPTER 21Monitoring and Tuning the KernelTo configure kernel probes with SystemTap, you need to write a script using theSystemTap scripting language, which is similar to the Awk scripting language. Whensaving the script, save it as a text file with the .stp file extension. The functions availableare defined in the stapfuncs man page accessible with the man stapfuncs command. Theprobe points available for monitoring can be viewed with the man stapprobes command.Example scripts can be studied with the man stapex command and at http://www.sourceware.org/systemtap/documentation.html.After writing the script, as root, execute the following command:stap The stap program reads the script, converts it to a program written in the C language,compiles the C code into a kernel module, and loads the kernel module. This module isused to gather information about the probes. For more details about the stap program,refer to its man page with the man stap command. The script will run until the user stopsit or if the exit() function is called in the script. By default, output from the script isdisplayed to the command line on which the stap command was executed.SummaryThe kernel controls many aspects of the operating system. It can be probed to determinethe state of the various subsystems such as the amount of available memory and whatprocessors are assigned to answer IRQ requests from specific hardware devices. While thekernel tries to manage the operating system as efficiently and fast as possible, its algorithmsare designed to work for all types of systems. Some of the kernel managementdecisions can be tuned so they work better for your system’s usage and load. Use thischapter to find out more about how your kernel works and if it can be tuned better forany of your systems. Remember to always test your kernel tweaks before modifying thekernel on a production system. Setting some kernel parameters to incorrect values cancause a slow down in performance or, in some cases, can cause the system to becomeunresponsive or lock up.

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

Saved successfully!

Ooh no, something went wrong!