Installing systemtap-2.6 on CentOS 5.8

Source: Internet
Author: User
Tags systemtap

recently in order to analyze the company's application performance of Nginx + LUA, just need to use the Nginx-lua of the spring god of the analysis of the script, so immediately to build the next

Environment:

    • CentOS 5.8
    • Lua 5.2.3
    • luajit-2.0.3
    • systemtap-2.6
    • Nginx

Dependencies:

    • systemtap-2.6 relies on elfutils

Note: CentOS 5.8 above the installation of systemtap-2.6, elfutils version can not be too high, or will error, installation systemtap-2.6 failure, the current version of the use is elfutils-0.149

The premise of this article is that you have compiled and installed the Nginx version of the support Lua, and you have installed the Systemstap required for the corresponding operating system kernel-debug-debuginfo and kernel-debuginfo-common , this version must be the same as the kernel version of your system, a character is not the same, The way to view the version is:

So my corresponding version is:

You can refer to the official documentation for specific installation steps.

Download the software required for installation systemtap-2.6
Download elfutils-0.149
Installing systemtap-2.6
  1. Decompression elfutils-0.149

  2. Decompression systemtap-2.6

  3. Installing systemtap-2.6

    Compile

    Installation

  4. Make a soft connection

  5. Validation commands

Note: Sometimes stap -V errors occur when you run a command, with the following error:

stap: /usr/lib64/libelf.so.1: version `ELFUTILS_1.5‘ not found (required by stap) stap: /usr/lib64/libdw.so.1: version `ELFUTILS_0.138‘ not found (required by stap) stap: /usr/lib64/libdw.so.1: version `ELFUTILS_0.142‘ not found (required by stap) stap: /usr/lib64/libdw.so.1: version `ELFUTILS_0.143‘ not found (required by stap) stap: /usr/lib64/libdw.so.1: version `ELFUTILS_0.149‘ not found (required by stap)

The workaround is to execute the following command:

//查看 stap 的安装路径 [[email protected] ~]$ eu-readelf -d /usr/bin/stap|grep -E "RPATH|RUNPATH"   RPATH             Library rpath: [/opt/stap/lib/systemtap]   RUNPATH           
Using the Spring God Script

Download script:

Take one of the foot of the school test, the results are as follows:

sudo./ngx-req-distr-c-M ' cat/opt/nginx/sbin/nginx.pid ' tracing 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 (/opt/nginx-lua/sbin/nginx) ... worker 5959:0 req    S, 0 Conns worker 5960:0 reqs, 0 conns worker 5961:0 reqs, 0 conns worker 5962:0 reqs, 0 conns worker 5963: 0 reqs, 0 conns worker 5964:0 reqs, 0 conns worker 5965:0 reqs, 0 conns worker 5966:0 reqs, 0 Conns worker 59 67:0 reqs, 0 conns worker 5968:0 reqs, 0 conns worker 5969:0 reqs, 0 conns worker 5970:387290 reqs, 15 Conns worker 5971:610857 Reqs, 106 Conns worker 5972:0 reqs, 0 conns worker 5973:0 reqs, 0 Conns worker 597 4:21 reqs, Conns worker 5975:0 reqs, 0 conns worker 5976:531284 reqs, Conns worker 5,977:57     1358 Reqs, 213 Conns worker 5978:560546 reqs, 165 conns worker 5979:629476 reqs, 14297 conns worker 5980: 575010 reqs, 247Conns worker 5981:650624 Reqs, 622 conns worker 5982:499562 reqs, 249 conns worker 5983:0 reqs, 0 Conns
Software Source Address
    • https://fedorahosted.org/releases/e/l/elfutils/0.149/
    • Https://github.com/openresty/nginx-systemtap-toolkit#sample-bt
    • http://debuginfo.centos.org/5/x86_64/
Reference reading
    • Https://github.com/openresty/nginx-systemtap-toolkit#sample-bt
    • http://m.blog.csdn.net/blog/hubaolin/18146413
Tags:

Installing systemtap-2.6 on CentOS 5.8

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.