<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[[列出时间]httpstat：一个检查网站性能的 curl 统计分析工具]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Unix/LinuxC技术]]></category>
<pubDate>Sat, 17 Dec 2016 03:01:23 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	httpstat 是一个 Python 脚本，它以美妙妥善的方式反映了 curl 统计分析，它是一个单一脚本，兼容 Python 3 ，在用户的系统上不需要安装额外的软件（依赖）。<br/><br/>-- Aaron Kili<br/><br/>本文导航<br/><br/>-在 Linux 系统中安装 httpstat25%<br/>-在 Linux 中如何使用 httpstat36%<br/>编译自： http://www.tecmint.com/httpstat-curl-statistics-tool-check-website-performance/<br/>作者： Aaron Kili<br/>译者： wyangsun<br/>从本质上来说它是一个 cURL 工具的封装，意味着你可以在 URL 后使用几个有效的 cURL 选项，但是不包括 -w、-D、-o、-s和-S选项，这些已经被 httpstat 使用了。<br/><br/><br/><br/>httpstat Curl 统计分析工具<br/><br/>你可以看到上图的一个 ASCII 表显示了每个过程消耗多长时间，对我来说最重要的一步是“服务器处理server processing” – 如果这个数字很高，那么你需要优化你网站服务器来加速访问速度[1]。<br/><br/>网站或服务器优化你可以查看我们的文章：<br/><br/>使用下面安装说明和用法来获取 httpstat 检查出你的网站速度。<br/><br/>在 Linux 系统中安装 httpstat<br/><br/>你可以使用两种合理的方法安装 httpstat ：<br/><br/>使用 wget 命令直接从它的 Github 仓库获取如下：<br/>$ wget -c https://raw.githubusercontent.com/reorx/httpstat/master/httpstat.py<br/>使用 pip（这个方法允许 httpstat 作为命令安装到你的系统中）像这样：<br/>$ sudo pip install httpstat<br/>注：确保 pip包已经在系统上安装了，如果没使用你的发行版包管理器yum或apt安装它。<br/><br/>在 Linux 中如何使用 httpstat<br/><br/>httpstat可以根据你安装它的方式来使用，如果你直接下载了它，进入下载目录使用下面的语句运行它：<br/><br/>$ python httpstat.py url cURL_options<br/>如果你使用 pip来安装它，你可以作为命令来执行它，如下表：<br/><br/>$ httpstat url cURL_options<br/>查看 httpstat帮助页，命令如下：<br/><br/>$ python httpstat.py --help<br/>或<br/>$ httpstat --help<br/>httpstat帮助：<br/><br/>Usage: httpstat URL [CURL_OPTIONS]<br/>httpstat -h &#124; --help<br/>httpstat --version<br/>Arguments:<br/>URL url to request, could be with or without `http(s)://` prefix<br/>Options:<br/>CURL_OPTIONS any curl supported options, except for -w -D -o -S -s,<br/>which are already used internally.<br/>-h --help show this screen.<br/>--version show version.<br/>Environments:<br/>HTTPSTAT_SHOW_BODY Set to `true` to show response body in the output,<br/>note that body length is limited to 1023 bytes, will be<br/>truncated if exceeds. Default is `false`.<br/>HTTPSTAT_SHOW_IP By default httpstat shows remote and local IP/port address.<br/>Set to `false` to disable this feature. Default is `true`.<br/>HTTPSTAT_SHOW_SPEED Set to `true` to show download and upload speed.<br/>Default is `false`.<br/>HTTPSTAT_SAVE_BODY By default httpstat stores body in a tmp file,<br/>set to `false` to disable this feature. Default is `true`<br/>HTTPSTAT_CURL_BIN Indicate the curl bin path to use. Default is `curl`<br/>from current shell $PATH.<br/>HTTPSTAT_DEBUG Set to `true` to see debugging logs. Default is `false`<br/>从上面帮助命令的输出，你可以看出 httpstat已经具备了一些可以影响其行为的环境变量。<br/><br/>使用它们，只需输出适当的值的这些变量到 .bashrc或.zshrc文件。<br/><br/>例如：<br/><br/>export HTTPSTAT_SHOW_IP=false<br/>export HTTPSTAT_SHOW_SPEED=true<br/>export HTTPSTAT_SAVE_BODY=false<br/>export HTTPSTAT_DEBUG=true<br/>你一旦添加完它们，保存文件然后运行下面的命令使改变生效：<br/><br/>$ source ~/.bashrc<br/>你可以指定使用 cURL 执行文件的路径，默认使用的是当前 shell 的 $PATH 环境变量[5]。<br/><br/>下面是一些展示 httpstat如何工作的例子。<br/><br/>$ python httpstat.py google.com<br/>或<br/>$ httpstat google.com<br/><br/><br/>httpstat – 展示网站统计分析<br/><br/>接下来的命令中：<br/><br/>-X命令标记指定一个客户与 HTTP 服务器连接的请求方法。<br/>--data-urlencode这个选项将会把数据（这里是 a=b）按 URL 编码的方式编码后再提交。<br/>-v开启详细模式。<br/>$ python httpstat.py httpbin.org/post -X POST --data-urlencode &quot;a=b&quot; -v<br/><br/><br/>httpstat – 定制提交请求<br/><br/>你可以查看 cURL 的帮助获取更多有用的高级选项，或者浏览 httpstat的 Github 仓库：https://github.com/reorx/httpstat<br/><br/>这篇文章中，我们讲述了一个有效的工具，它以简单和整洁方式来查看 cURL 统计分析。如果你知道任何类似的工具，别犹豫，让我们知道，你也可以问问题或评论这篇文章或 httpstat，通过下面反馈。
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [列出时间]httpstat：一个检查网站性能的 curl 统计分析工具]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>