installing perf on RedHat

5

2

I read about perf tool and I was interested in using in my RedHat. On Ubuntu it is enough to call sudo apt-get install linux-tools-2.6.38-11.

What about RED HAT? I tried both:

yum install linux-tools
yum install perf

...but it doesn't work.

Do you know where I can get the source code so that I can compile it on my own? Currently the YUM repository is pointing to a server having most packages we usually install, but maybe it is missing this package.

What repository can I add to download it?

Are my call to yum correct? I read that call from http://joysofprogramming.com/install-perf-fedora-rhel/

Thanks a lot

p.s. below details about my machine

uname -a
Red Hat Enterprise Linux Server release 5.3 (Tikanga)

cat /etc/redhat-release
Linux lndbxdev01 2.6.24.7-108.el5rt #1 SMP PREEMPT RT Mon Mar 23 10:58:10 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

This is the error message

Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
myrepository                                           |  951 B     00:00     
Setting up Install Process
Parsing package install arguments
No package perf available.
Nothing to do

Abruzzo Forte e Gentile

Posted 2012-03-21T13:51:49.963

Reputation: 1 415

Re: "doesn't work" -- what was the actual error message? – RedGrittyBrick – 2012-03-21T14:39:09.580

Answers

5

perf is new enough that it's not available in RHEL 5.x, IIRC it was added only in kernel 2.6.31. It's there in RHEL 6, though.

janneb

Posted 2012-03-21T13:51:49.963

Reputation: 987

2

It looks like it is available in epel repository. You need to run the following command as root to install epel repos on your RedHat/CentOS machine:

 rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

Then

yum update

and then

yum install google-perftools google-perftools-devel

If you are running RHEL6 then you have to install the following as per the link you sent:

rpm -Uvh http://pkgs.org/centos-6-rhel-6/epel-i386/pprof-2.0-3.el6.2.noarch.rpm.html

The above should do it.

milosgajdos

Posted 2012-03-21T13:51:49.963

Reputation: 218