1. 程式人生 > >openresy火焰圖

openresy火焰圖

yum -y install elfutils-devel gettext 

wget https://sourceware.org/systemtap/ftp/releases/systemtap-3.3.tar.gz

tar zxvf systemtap-3.3.tar.gz

cd systemtap-3.3

./configure; make; make install

執行stap -ve 'probe begin { log("hello systemtap!") exit() }'

如果提示:Checking "/lib/modules/2.6.32-431.el6.x86_64/build/.config" failed with error: No such file or directory

下載相應的核心版本 kernel-devel-2.6.32-431.el6.x86_64.rpm

 rpm -ivh kernel-devel-2.6.32-431.el6.x86_64.rpm

 ln -f -s  /usr/src/kernels/2.6.32-431.el6.x86_64/ /lib/modules/2.6.32-431.el6.x86_64/build

如果提示:Pass 5: run completed in 0usr/10sys/300real ms.表示成功

wget http://debuginfo.centos.org/6/x86_64/kernel-debuginfo-common-x86_64-2.6.32-431.el6.x86_64.rpm

rpm -ivh kernel-debuginfo-common-x86_64-2.6.32-431.el6.x86_64.rpm

參考:

用wget從https://github.com/openresty/nginx-systemtap-toolkit下載最新的openresty除錯工具,然後解壓到/opt即可。 用wget從https://github.com/brendangregg/FlameGraph下載最新的FlameGraph(火焰圖),然後解壓到/opt即可。

未完待續