Hi,
环境信息:
LSB Version: :base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.4 (Final)
Release: 6.4
Codename: Final
nginx version: openresty/1.11.2.3
内核版本:2.6.32-358.el6.i686
1. systemtap已经正确安装
[root@localhost stapxx]# stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}'
Pass 1: parsed user script and 112 library script(s) using 32348virt/19848res/2792shr/17796data kb, in 340usr/300sys/638real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 4 embed(s), 0 global(s) using 87644virt/75800res/3916shr/73092data kb, in 2510usr/1460sys/7533real ms.
Pass 3: translated to C into "/tmp/stapYBoa0s/stap_81e9c984bfa6a994e46362c93d58db7e_1557_src.c" using 87644virt/76144res/4260shr/73092data kb, in 20usr/10sys/32real ms.
Pass 4: compiled C into "stap_81e9c984bfa6a994e46362c93d58db7e_1557.ko" in 2350usr/2120sys/5586real ms.
Pass 5: starting run.
read performed
Pass 5: run completed in 20usr/110sys/411real ms.
2. 用ab压测接口:
#curl 'nginx_conf_scripting.cn/mysql/cats'
location = /mysql/cats {
drizzle_query 'select * from cats';
drizzle_pass my_mysql_backend;
rds_json on;
}
ab -n 50000 -c20 -k nginx_conf_scripting.cn/mysql/cats
3. 压测接口时获取不到采样数据,WARNING: Found 0 JITted samples. 生成的tmp.bt文件是0字节
nginx 的worker的pid是23300
[root@localhost stapxx]# ./samples/lj-lua-stacks.sxx --arg time=1 --skip-badvars -x 23300 > tmp.bt
Found exact match for libluajit: /usr/local/openresty/luajit/lib/libluajit-5.1.so.2.1.0
WARNING: Start tracing 23300 (/usr/local/openresty/nginx/sbin/nginx)
WARNING: Please wait for 1 seconds...
WARNING: Time's up. Quitting now...
WARNING: Found 0 JITted samples.