Nginx压力测试
nginx_lua压力测试工具
工具安装:
依赖库安装
yum install kernel-*
systemtap安装
yum install systemtap //安装systemtap
测试:sudo stap -ve 'probe begin { log("hello Systemtap!") exit() }'
Pass 1: parsed user script and 111 library script(s) using 206480virt/34216res/3240shr/31320data kb, in 200usr/10sys/325real ms.
Pass 2: analyzed script: 1 probe(s), 2 function(s), 0 embed(s), 0 global(s) using 207140virt/35204res/3544shr/31980data kb, in 0usr/0sys/11real ms.
Pass 3: using cached /root/.systemtap/cache/85/stap_85ed18ab88fdc901b7b73e3c4b4ad9d9_1060.c
Pass 4: using cached /root/.systemtap/cache/85/stap_85ed18ab88fdc901b7b73e3c4b4ad9d9_1060.ko
Pass 5: starting run.
hello Systemtap!
Pass 5: run completed in 0usr/20sys/343real ms.
表示安装成功
查看共享内存使用情况
./ngx-shm -p 4526
Tracing 4526 (/usr/local/webserver/nginx/sbin/nginx)...
shm zone "rules"
owner: ngx_http_lua_shdict
total size: 1024 KB
free pages: 996 KB (249 pages, 1 blocks)
9 microseconds elapsed in the probe handler.
官方文档
https://github.com/openresty/openresty-systemtap-toolkit
基本介绍
http://blog.csdn.net/cheng\_fangang/article/details/44937377