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.

450CHAPTER 22Monitoring and Tuning ApplicationsSetting Up OProfileAll OProfile commands must be run as the root user except the opcontrol --dump,opcontrol --list-events, and ophelp commands. Before each profile creation, makesure OProfile is not already running by executing the following command as root:opcontrol --shutdownAlso clear any previous data:opcontrol --resetProvide the kernel to profile and set up the OProfile environment (vmlinux comes fromkernel-debuginfo):opcontrol --setup --vmlinux=/usr/lib/debug/lib/modules/`uname -r`/vmlinuxIn addition to specifying the vmlinux file to use, this command loads the oprofile kernelmodule and sets up the /dev/oprofile/ directory. To verify that the kernel module isloaded, run the command lsmod | grep oprofile. At this point, the /root/.oprofile/daemonrc file is created (or modified if it already exists) to save the settings as shown inListing 22.1. As settings are changed as discussed later in this chapter, the values in thisfile are changed as well so they can be used for subsequent uses of OProfile.LISTING 22.1Default OProfile SettingsNR_CHOSEN=0SEPARATE_LIB=0SEPARATE_KERNEL=0SEPARATE_THREAD=0SEPARATE_CPU=0VMLINUX=/usr/lib/debug/lib/modules/2.6.18-1.2747.el5/vmlinuxIMAGE_FILTER=CPU_BUF_SIZE=0CALLGRAPH=0KERNEL_RANGE=c0400000,c0612de1XENIMAGE=noneSetting Up Events to MonitorUse the following command to determine the CPU type being used by OProfile:cat /dev/oprofile/cpu_typeIt displays the processor type such as i386/p4 or i386/core_2. If timer is displayed, theprocessor does not have performance monitoring hardware, so the timer interrupt isbeing used.

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

Saved successfully!

Ooh no, something went wrong!