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

http://rpm.pbone.net/index.php3/stat/4/idpl/24668468/dir/scientific_linux_6/com/kernel-devel-2.6.32-431.el6.x86_64.rpm.html

下载相应的内核版本 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 http://debuginfo.centos.org/6/x86_64/kernel-debuginfo-2.6.32-431.el6.x86_64.rpm

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

参考:

http://xbsura.com/2016/10/12/openresty%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96%E5%B0%8F%E7%BB%93/

用wget从https://github.com/openresty/nginx-systemtap-toolkit下载最新的openresty调试工具,然后解压到/opt即可。
用wget从https://github.com/brendangregg/FlameGraph下载最新的FlameGraph(火焰图),然后解压到/opt即可。

未完待续

猜你喜欢

转载自blog.csdn.net/imilli/article/details/82385023