Simple Linux Panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mdserver-web/plugins/op_waf/t/readme.md

30 lines
721 B

3 years ago
# 火焰图安装 [ubuntu 20.04]
3 years ago
```
sudo apt-get install -y linux-tools-common linux-tools-generic linux-tools-`uname -r`
apt-get update -y
3 years ago
sudo apt -y install elfutils
3 years ago
apt-get install -y systemtap gcc
sudo apt-get install -y linux-headers-generic gcc libcap-dev
apt install -y kernel-debuginfo-common kernel-debuginfo
```
# 测试有效性
```
stap -ve 'probe begin { log("hello systemtap!") exit() }'
stap -e 'probe kernel.function("sys_open") {log("hello world") exit()}'
stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}'
```
# openresty 测试
```
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
```