Installing systemtap on CentOS 6

In this article I will post series of commands that I used for installing systemtap on CentOS 6.3

yum --disablerepo="*" --enablerepo="centosplus" install kernel.x86_64
yum install kernel-debuginfo.x86_64

reboot

[root@lab1 ~]# uname -r
2.6.32-279.22.1.el6.centos.plus.x86_64    ### After reboot we are on a new kernel from the centosplus repo
[root@lab1 ~]# stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}'
Checking "/lib/modules/2.6.32-279.22.1.el6.centos.plus.x86_64/build/.config" failed with error: No such file or directory
Incorrect version or missing kernel-devel package, use: yum install kernel-devel-2.6.32-279.22.1.el6.centos.plus.x86_64 


yum --disablerepo="*" --enablerepo="centosplus" install kernel-devel.x86_64

[root@lab1 yum.repos.d]# stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}'
Pass 1: parsed user script and 82 library script(s) using 194432virt/23108res/3032shr kb, in 150usr/140sys/330real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 3 embed(s), 0 global(s) using 419080virt/120152res/8200shr kb, in 1600usr/870sys/2719real ms.
Pass 3: translated to C into "/tmp/stapfsss5b/stap_fa03e96bd5bec496c0cb8ac61c9c099c_1590_src.c" using 409312virt/116044res/6532shr kb, in 20usr/0sys/16real ms.
Pass 4: compiled C into "stap_fa03e96bd5bec496c0cb8ac61c9c099c_1590.ko" in 11210usr/3570sys/15241real ms.
Pass 5: starting run.
read performed    ### Success
Pass 5: run completed in 50usr/90sys/436real ms.
This entry was posted in RedHat and tagged . Bookmark the permalink.

2 Responses to Installing systemtap on CentOS 6

  1. Y.H. Chang says:

    Hi,
    I did:
    yum –disablerepo=”*” –enablerepo=”centosplus” install kernel.x86_64
    But stop with :
    yum install kernel-debuginfo.x86_64
    I got:
    =================================
    [root@localhost yh]# yum install kernel-debuginfo.x86_64
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
    * base: ftpmirror.your.org
    * centosplus: ftpmirror.your.org
    * epel: linux.mirrors.es.net
    * extras: mirrors.syringanetworks.net
    * updates: yum.singlehop.com
    Setting up Install Process
    No package kernel-debuginfo.x86_64 available.
    Error: Nothing to do
    ===========================
    [root@localhost yh]# yum –disablerepo=”*” –enablerepo=”centosplus” install kernel-debuginfo.x86_64
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
    * centosplus: ftpmirror.your.org
    Setting up Install Process
    No package kernel-debuginfo.x86_64 available.
    Error: Nothing to do

    Thanks,

  2. admin says:

    I forgot to mention that before doing any of the commands – I enabled [debug] repo.
    Go to /etc/yum.repos.d/
    vi CentOs-Debuginfo.repo
    And make sure it’s enabled
    enabled=1

Leave a Reply

Your email address will not be published. Required fields are marked *