Example Usage; Dev/Profile - Red Hat ENTERPRISE LINUX 3 System Administration Manual

Hide thumbs Also See for ENTERPRISE LINUX 3:
Table of Contents

Advertisement

Chapter 43. OProfile
43.5.4. Using
op_merge
If multiple sample files exist for the exact same executable or library, the sample files can be merged
for easier analysis.
For example, to merge files for the library
command as root:
op_merge /usr/lib/library-1.2.3.so
The resulting file is
/var/lib/oprofile/samples/}usr}lib}library-1.2.3.so
To limit the samples merged to a specific counter, use the
43.6. Understanding
The
/dev/oprofile/
display the values of the virtual files in this file system. For example, the following command displays
the type of processor OProfile detected:
cat /dev/oprofile/cpu_type
A directory exists in
directories
/dev/oprofile/0/
Each directory for a counter contains the following files:
— Interval between samples
count
— If 0, the counter is off and no samples are collected for it; If 1, the counter is on and
enabled
samples are being collected for it
— Event to monitor
event
— If 0, samples are not collected for this counter event when the processor is in kernel-
kernel
space; if 1, samples are collected even if the processor is in kernel-space
— Which unit masks are enabled for the counter
unit_mask
— If 0, samples are not collected for the counter event when the processor is in user-space; if
user
1, samples are collected even if the processor is in user-space
The values of these files can be retrieved with the
cat /dev/oprofile/0/count

43.7. Example Usage

While OProfile can be used by developers to analyze application performance, it can also be used by
system administrators to perform system analysis. For example:
Determine which applications and services are used the most on a system —
to determine how much processor time an application or service uses. If the system is used for
multiple services but is under performing, the services consuming the most processor time can be
moved to dedicated systems.

/dev/profile/

directory contains the file system for OProfile. Use the
for each counter. For example, if there are 2 counters, the
/dev/oprofile/
and
dev/oprofile/1/
/usr/lib/library-1.2.3.so
option followed by the counter number.
-c
exist.
command. For example:
cat
311
, execute the following
.
command to
cat
can be used
op_time

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 3 and is the answer not in the manual?

Questions and answers

Table of Contents