From 969d02ef9304fed824f34b975cfff03baf5de9b1 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 13 Oct 2022 04:35:23 +0800 Subject: [PATCH] Update ngx_debug.sh --- plugins/op_waf/t/ngx_debug.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/plugins/op_waf/t/ngx_debug.sh b/plugins/op_waf/t/ngx_debug.sh index 6957697c5..6394013ef 100644 --- a/plugins/op_waf/t/ngx_debug.sh +++ b/plugins/op_waf/t/ngx_debug.sh @@ -1,6 +1,19 @@ #!/bin/sh +# https://moonbingbing.gitbooks.io/openresty-best-practices/content/flame_graph/install.html +# apt install elfutils +# sudo apt-get install -y systemtap gcc +# sudo apt-get install linux-headers-generic gcc libcap-dev + + +# cat > /etc/apt/sources.list.d/ddebs.list << EOF +# deb http://ddebs.ubuntu.com/ precise main restricted universe multiverse +# EOF +# +# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ECDCAD72428D7C01 +# apt-get update + # cd /www/server/mdserver-web/plugins/op_waf/t && sh ngx_debug.sh lua t1 # cd /www/server/mdserver-web/plugins/op_waf/t && sh ngx_debug.sh c t2 @@ -15,6 +28,7 @@ name=$2 + # /opt/openresty-systemtap-toolkit/ngx-active-reqs -p 496435 # /opt/openresty-systemtap-toolkit/sample-bt -p 496435 -t 5 -k > a.bt @@ -27,7 +41,7 @@ if [ ! -d /opt/openresty-systemtap-toolkit ];then cd /opt && git clone https://github.com/openresty/openresty-systemtap-toolkit fi -if [ ! -d stapxx ];then +if [ ! -d /opt/stapxx ];then cd /opt && git clone https://github.com/openresty/stapxx fi