Skip to content

Instantly share code, notes, and snippets.

@netnr

netnr/ab

Last active Feb 26, 2021
Embed
What would you like to do?
Linux使用ab压力测试工具
# 安装
yum install httpd-tools
# 版本
ab -V
# Get请求,10并发 总100次
ab -c 10 -n 100 https://ub.netnr.eu.org/
# Post请求(发送当前目录下的 post.txt 文件:uid=1&pwd=1)
ab -c 10 -n 100 -p post.txt https://ub.netnr.eu.org/
# 带上Cookie -C 指定键值对
ab -c 10 -n 100 -C 'uid=1' https://ub.netnr.eu.org/
# 修改进程最大文件数
ulimit -n 102400
# 查看
ulimit -n
ulimit -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment