压测工具总结
来源:互联网 发布:dota2数据查询网站 编辑:程序博客网 时间:2024/04/29 20:24
1.server
服务器端查看性能
tail -f nginx.log | awk '{print $4;}' | sort | uniq -c
有很多时候,你不清楚浏览器到底是怎么请求的消息
apache服务器为例子,首先停止服务器
/etc/init.d/httpd start|stop|restart|reload|status
使用万能工具nc
nc -l 80
截获浏览器请求,安装原样,使用压测工具请求即可~
2.jmeter
没有研究过,不过cookie需要单独写入
3.ab
<span style="font-size:10px;"><span style="font-size:10px;"><span style="font-size:10px;"><?php$file=fopen('log.txt','a+');fwrite($file,date("Y-m-d H:i:s"));fwrite($file," ");fwrite($file,$_REQUEST['test']);fwrite($file,"\r\n");fclose($file);?></span></span></span>压测上面的php页面
test1=a&test2=b
下面这种格式是错误的,ab会把整个a回车test2=b 当作test1这个field传送出去
test1=a
test2=b
4.pylot
具体使用看我以前的文章
使用pylot压测时,有时候返回一种错误 504 : Gateway Timeout with urllib2
5xx status codes are problems with the server (compared with 4xx status codes, which are problems with the client). This means you sent the server a valid request, but the server was unable to serve a valid response.
Your code is fine, but the server (or in this case, a gateway that the server is using) is having problems. You just need to wait patiently for the server to resolve its own issues, or contact the server administrator and inform them that their server is misbehaving.
5.conclusion
几种工具比较起来
ab性能比较好,可以并发压力比较大,但是服务比较笨,无法处理302跳转这些动作
pylot性能稍差,但是文档和报告都比较好,最好的是可以改动源码,对问题进一步跟踪
http://www.vpser.net/opt/webserver-test.html
- 压测工具总结
- 工具总结
- 个人开发工具总结
- 【转】web 工具总结
- JAVA反编译工具总结
- sqlplus工具使用总结
- WORD比较工具-总结
- Java命令行工具总结
- Android开发工具总结
- 数据恢复工具总结
- Android开发工具总结
- 工具 j2EE 总结
- linux 调试工具总结
- android反编译工具总结
- Java开发工具总结
- 数据恢复工具总结
- UML设计工具总结
- 自动测试-工具[总结]
- Init Call Mechanism in the Linux Kernel
- window2008 、 oracle11.2g 无法imp,dmp。
- Android Build及相关类
- uva 12304 2D Geometry 110 in 1! 计算几何
- ExecutorService与Executors例子的简单剖析
- 压测工具总结
- iOS系列教程之用instruments来检验你的app
- svn containing working copy admin area is missing错误解决
- 想学习SharePoint,需要准备哪些方面的准备?--写给SharePoint新人
- 开源许可证GPL、BSD、MIT、Mozilla、Apache和LGPL的区别
- python设计模式练习
- 在xcode5中修改整个项目名
- 例行性工作安排(crontab)
- if __name__ == "__main__"