美文网首页
Apache ab压力测试

Apache ab压力测试

作者: yangyangrenren | 来源:发表于2018-05-14 19:46 被阅读0次

    Apache ab测试。
    Mac pro中,自带了Apache。

    $ sudo apachectl -v
    Password:
    Server version: Apache/2.4.29 (Unix)
    Server built:   Jan 17 2018 18:20:31
    

    执行命令 sudo apachectl start ,启动apache。打开浏览器,输入http://localhost/ ,可以看到“It works!”的界面。

    ab -n 4 -c 4 https://www.baidu.com/
    

    如果报错apr_poll: The timeout specified has expired (70007),解决方案:在命令行中加-k 使得connection keep alive。

    ab -n 4 -c 4 -k https://www.baidu.com/
    

    参考网址:
    1.https://www.cnblogs.com/lixuan1998/p/7077923.html

    相关文章

      网友评论

          本文标题:Apache ab压力测试

          本文链接:https://www.haomeiwen.com/subject/ypgjdftx.html