【问题标题】:How to use Apache BenchMark without a domain name?如何在没有域名的情况下使用 Apache BenchMark?
【发布时间】:2018-01-19 11:45:40
【问题描述】:

我的服务器没有任何域名。
它只是一个后端 api。 我打算将它与IP地址一起使用。

如何在没有域名的情况下测试基准?

an -n 1000 -c -10 http://ip_address

不工作

【问题讨论】:

    标签: linux apache ubuntu server benchmarking


    【解决方案1】:

    将 IP 映射到 /etc/hosts 中的服务器名称

     phantom.local 10.0.0.7
    

    然后执行

    ab -n 555 -c -10 http://phantom.local -
    

    【讨论】:

    • ab -n 1000 -c -10 http://ip_address -- 这是错误的,我必须使用斜杠ab -n 1000 -c -10 http://ip_address/
    • np,不会改变我的答案 ;-)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-30
    • 2021-10-30
    相关资源
    最近更新 更多