【SystemTap】 Linux下安裝使用SystemTap源碼安裝SystemTap

來源:互聯網
上載者:User

文章 http://blog.csdn.net/zklth/archive/2010/09/28/5912785.aspx 介紹的是使用CentOS預設的SystemTap,這裡介紹使用SystemTap源碼獨立安裝SystemTap.

源碼

SystemTap: ftp://sources.redhat.com/pub/systemtap/
SystemTap: ftp://sources.redhat.com/pub/systemtap/releases/
elfutils:  https://fedorahosted.org/releases/e/l/elfutils/

SystemTap需要elfutils的支援,並且相應的 elfutils 版本還不能太老,否則執行SystemTap的 ./configure 時會出現如下錯誤:

error: elfutils, libdw too old, need 0.126+

但是安裝SystemTap之前並不是要首先安裝 elfutils ,而是在配置 SystemTap 時指定與 elfutils 相關的參數,使得在編譯安裝SystemTap時自動編譯

--------------------------------------------------

cd /local/zkl/systemtap-1.1
./configure  --with-elfutils=/local/zkl/elfutils-0.137 --prefix=/local/zkl/SystemTap
( 配置systemtap安裝參數,指定 elfutils 的源碼目錄以及SystemTap的安裝路徑 )
make
make install

執行完畢,SystemTap安裝在 /local/zkl/SystemTap 下

--------------------------------------------------

[root@hdfs05 SystemTap]# ls
bin  etc  include  lib  libexec  share

[root@hdfs05 SystemTap]# bin/stap -V
SystemTap translator/driver (version 1.1/0.137 non-git sources)
Copyright (C) 2005-2009 Red Hat, Inc. and others
This is free software; see the source for copying conditions.

系統預設安裝的SystemTap可以不用卸載,因為卸載時可能會卸載一些其它相關的包,以下是查看系統預設安裝的 systemtap,
[root@hdfs05 SystemTap]# rpm -q systemtap
systemtap-0.6.2-1.el5

我們只需要通過配置環境變數就能使執行命令時首先在我們安裝的SystemTap中尋找命令:
vim  ~/.bashrc
 export PATH=/local/zkl/SystemTap/bin:$PATH
source ~/.bashrc

[root@hdfs05 SystemTap]# stap -V
SystemTap translator/driver (version 1.1/0.137 non-git sources)
Copyright (C) 2005-2009 Red Hat, Inc. and others
This is free software; see the source for copying conditions.

========================

 

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.