Visits

[+/-]
Today:
Yesterday:
Day before yesterday:
337
517
481

+36
This week:
Last week:
Week before last week:
2196
2962
3860

-898

Last month:
Month before last month:
8454
15650
24339

-8689

Visitor Data

IP ADDRESS
38.107.179.210
-
Location
United States
-
Browser
Unknown Browser
-
Operating System
Unknown Operating System


   
Add to: JBookmarks Add to: Bookmarks.cc Add to: Digg Add to: Reddit Add to: Upchuckr Add to: StumbleUpon Add to: Slashdot Add to: Blogmarks Add to: Technorati Add to: Newsvine Add to: Blinkbits Add to: Smarking Add to: Spurl Add to: Google Information
Running OPROFILE on Fedora

oprofile - steps for running oprofile on Fedora.

Step 1:

Find out what version of the kernel you are running.

$ uname -a
Linux closet.squeezel.com 2.6.12-1.1398_FC4 #1 Fri Jul 15 00:52:32 EDT 2005 i686 i686 i386 GNU/Linux


Step 2:

Download the source in a chosen directory. Above, I'm running 2.6.12-1, but I'm going to go for 2.6.12.3, since
it's a little later. You want the signed file as well.

$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.12.3.tar.gz
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.12.3.tar.gz.sign

Now, check the signature.

$ gpg --verify linux-2.6.12.3.tar.gz.sign linux-2.6.12.3.tar.gz


Step 3:

Unpack the file.

$ tar -xzf linux-2.6.12.3.tar.gz
$ cd cd linux-2.6.12.3


Step 4:

Copy the ".config" used to compile your previous kernel. You should find it
in the following direcotry "/lib/modules/$(uname -r)/build/.config".

Copy it to the linux-2.6.12.3 directory.

$ cp "/lib/modules/$(uname -r)/build/.config" .


Step 5:

Run make as follows. It will ask for a few questions on "make oldconfig". The
make installs below will have to be done with root privileges.

$ make oldconfig
$ make bzImage
$ make modules
$ make modules_install
$ make install


Step 6:

Edit the "/boot/grub/grub.conf" and set default = 0  as shown below in this
file.

default=0
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.12.3)
root (hd0,2)
kernel /vmlinuz-2.6.12.3 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.12.3.img
title Fedora Core (2.6.12-1.1398_FC4)
root (hd0,2)
kernel /vmlinuz-2.6.12-1.1398_FC4 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.12-1.1398_FC4.img
title Fedora Core (2.6.11-1.1369_FC4)
root (hd0,2)
kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.11-1.1369_FC4.img
title Other
rootnoverify (hd0,1)
chainloader +1


Step 7:

Shutdown with the restart option.

$ shutdown -r now


Step 8:

Run opcontrol. The commands below are done as root.  My kernel was compiled in the following
directory "/home/kernel/linux-2.6.12.3/", so I'll run opcontrol as follows:

$ opcontrol --vmlinux=/home/kernel/linux-2.6.12.3/vmlinux

Now start.

$ opcontrol --start
Using 2.6+ OProfile kernel interface.
Reading module info.
Using log file /var/lib/oprofile/oprofiled.log
Daemon started.
Profiler running.

Shutdown opcontrol.

$ opcontrol --shutdown

Run report.

$ opreport

CPU: CPU with timer interrupt, speed 0 MHz (estimated)
Profiling through timer interrupt
TIMER:0|
samples|      %|
------------------
156088 99.8746 vmlinux
60  0.0384 libc-2.3.5.so
30  0.0192 oprofiled
23  0.0147 libcrypto.so.0.9.7f
13  0.0083 bash
12  0.0077 screen
10  0.0064 sshd
9  0.0058 ssh
6  0.0038 ip_tables
6  0.0038 libncurses.so.5.4
5  0.0032 b44
5  0.0032 ext3
5  0.0032 ld-2.3.5.so
4  0.0026 ip_conntrack
4  0.0026 jbd
2  0.0013 grep
1 6.4e-04 libdns.so.20.0.2
1 6.4e-04 libisc.so.9.1.5


Reference the following for more documentation:
http://oprofile.sourceforge.net/doc/