linux下ab压力测试命令

前几天发现一个linux下的ab压力测试命令,可以用来找到ddos利用点后进一步实施ddos攻击,参数如下:

-n 要执行的请求数
-c 1个请求的并发数
-t? 最大等待响应时间
-b TCP发送/接收缓冲区的大小,以字节为单位
-p postfile??? 包含数据的文件
-u putfile????? 包含数据的文件
-T content-type Content-type header for POSTing, eg.#发送类型头部信息
‘application/x-www-form-urlencoded’
Default is ‘text/plain’
-v verbosity?? 打印故障排除信息
-w??????????? 以HTML表打印出结果
-i????????????? 用头代替
-C attribute??? Add cookie, eg. ‘Apache=1234. (repeatable)#添加Cookies
-H attribute??? Add Arbitrary header line, eg. ‘Accept-Encoding: gzip’
Inserted after all normal header lines. (repeatable)
-A attribute??? Add Basic WWW Authentication, the attributes
are a colon separated username and password.
-P attribute??? Add Basic Proxy Authentication, the attributes
are a colon separated username and password.
-X proxy:port?? Proxyserver and port number to use
-V????????????? Print version number and exit
-k????????????? Use HTTP KeepAlive feature
-d????????????? Do not show percentiles served table.
-S????????????? Do not show confidence estimators and warnings.
-g filename???? Output collected data to gnuplot format file.
-e filename???? Output CSV file with percentages served
-r????????????? Don’t exit on socket receive errors.
-h????????????? Display usage information (this message)
-Z ciphersuite? Specify SSL/TLS cipher suite (See openssl ciphers)
-f protocol???? Specify SSL/TLS protocol (SSL3, TLS1, or ALL)

常用格式记录下:
get请求命令:ab -n 1000 -c 1000 -k http://localhost/index.do?get=ab
post请求命令:ab?-n 1000?-c 1000?-k?-p?postfile.ab?http://localhost/index.do #postfile.ab中为json数据

发表评论

电子邮件地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.