Hello,春哥,我在debian上安装openresty的测试工具遇到些问题
uname -r 显示版本为 3.16.0-4-amd64
perl版本为5.20.2
openresty是源码编译的
下面是我安装测试工具步骤
--------------------我是可爱的分割线---------------------
#!/bin/bash
install_path=/soft
stap_path=/opt/stap
systemtap_version=3.0
#1. install basics - wget git
apt-get install wget git -y
#2. install systemtap
#2.1 install dependent
apt-get install build-essential zlib1g-dev elfutils libdw-dev gettext
#2.2 install kernel-debuginfo kernel-devel
apt-get install linux-image-$(uname -r)-dbg
apt-get install linux-headers-$(uname -r)
#2.3 install systemtap
#systemtap版本在2.1以上
mkdir $install_path
cd $install_path
tar -xvf systemtap-$systemtap_version.tar.gz
cd systemtap-$systemtap_version
./configure --prefix=$stap_path --disable-docs --disable-publican --disable-refdocs CFLAGS="-g -O2"
make && make install
rm -rf systemtap-$systemtap_version.tar.gz
#3. install openresty-systemtap-toolkit stapxx
#3.1 utrace
#如果linux kernels版本低于3.5, 则需打utrace patch
#3.2 perl
#perl 要求版本在5.6.1以上
#3.3 git clone openresty-systemtap-toolkit stapxx
cd $install_path
#4. install FlameGraph
cd $install_path
#5. PATH
new_profile=/etc/profile.d/openresty_toos.sh
echo "PATH=\$PATH:$stap_path/bin" > $new_profile
echo "PATH=\$PATH:$install_path/stapxx" >> $new_profile
echo "PATH=\$PATH:$install_path/FlameGraph" >> $new_profile
echo "export LC_ALL=C" >> $new_profile
#source $new_profile
--------------------我是可爱的分割线---------------------
安装过程也没有问题,
但是我用openresty-systemtap-toolkit的第一个指令就出现了问题
./ngx-active-reqs -p 12545
报错如下:
WARNING: Kernel function symbol table missing [man warning::symbols]
WARNING: cannot find module /secone/webapng/nginx/sbin/nginx debuginfo: No DWARF information found [man warning::debuginfo]
semantic error: while processing probe process("/secone/webapng/nginx/sbin/nginx").function("ngx_process_events_and_timers") from: process("/secone/webapng/nginx/sbin/nginx").function("ngx_process_events_and_timers")
semantic error: unable to find global 'ngx_cached_time' in /secone/webapng/nginx/sbin/nginx: operator '@var' at <input>:16:22
source: cached_sec = @var("ngx_cached_time")->sec
^
Pass 2: analysis failed. [man error::pass2]
Number of similar warning messages suppressed: 327.
Rerun with -v to see them.
请问,
1. 第二个WARNING,提示找不到debuginfo,那安装的linux-image-$(uname -r)-dbg是不是没生效?
2. 下面的semantic error该如何修补?