2019-04-21 11:50:48 +08:00

28 lines
1.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="ab">ab</h1>
<p>Apache服务器的性能测试工具</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>ab命令</strong> 是Apache的Web服务器的性能测试工具它可以测试安装Web服务器每秒种处理的HTTP请求。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">ab(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-A指定连接服务器的基本的认证凭据
-c指定一次向服务器发出请求数
-C添加cookie
-g将测试结果输出为“gnuolot”文件
-h显示帮助信息
-H为请求追加一个额外的头
-i使用“head”请求方式
-k激活HTTP中的“keepAlive”特性
-n指定测试会话使用的请求数
-p指定包含数据的文件
-q不显示进度百分比
-T使用POST数据时设置内容类型头
-v设置详细模式等级
-w以HTML表格方式打印结果
-x以表格方式输出时设置表格的属性
-X使用指定的代理服务器发送请求
-y以表格方式输出时设置表格属性。</code></pre>
<h3 id="参数">参数</h3>
<p>主机:被测试主机。</p>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->