ab命令的简介及优缺点

  • A+
所属分类:运维教程

ab的全称为apache bench。

ab的优点:这家伙是apache自带的测试工具,他不但可以帮助我们测试你本机apache的性能 ,还可以对其他类型的服务器进行网站访问压力测试,比如nginx/tomcat/IIS等,它也可以测试负载压力。

缺点:ab命令会给服务器造成非常高的负载,可能会造成目标服务器资源耗尽,严重时可能会导致死机,而且它没有图形化结果,不能监控,所以只能用作临时紧急任务和简单的测试。

ab的工作原理:ab会创建多个并发线程,模拟多个访问者同时对某一个url地址进行访问,测试的目标基于url。

安装httpd时,ab也会被同时安装,所以不需要再另行安装,使用ab -V命令可查看版本。

  • 问答中心
  • 微信小程序扫一扫
  • weinxin
  • 微信公众
  • 微信公众号扫一扫
  • weinxin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:22   其中:访客  22   博主  0

    • avatar that site

      I believe you have remarked some very interesting details , thankyou for the post.

      • avatar Legal psychedelics

        Just want to say your article is as astonishing. The clarity in your post is just great and i could assume you are an expert on this subject. Fine with your permission allow me to grab your feed to keep up to date with forthcoming post. Thanks a million and please keep up the rewarding work.