<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://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://jackxiang.com/post//</link>
<title><![CDATA[Linux查看网络流量的脚本]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Fri, 19 Dec 2008 03:26:10 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	<br/><div class="code"># cat stream<br/><br/><br/>#! /bin/bash<br/><br/># Write by Neil.xu qq:37391319 email: xurongzhong@gmail.com<br/><br/># 2008-8-19 we need to monitor streams of LTS channels, so write this script<br/><br/>typeset in in_old dif_in dif_in1 dif_out1<br/>typeset out out_old dif_out<br/><br/>in_old=$(cat /proc/net/dev &#124; grep eth0 &#124; sed &#039;s=^.*:==&#039; &#124; awk &#039;&#123; print $1 &#125;&#039; )<br/>out_old=$(cat /proc/net/dev &#124; grep eth0 &#124; sed &#039;s=^.*:==&#039; &#124; awk &#039;&#123; print $9 &#125;&#039;)<br/><br/>while true<br/>do<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sleep 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in=$(cat /proc/net/dev &#124; grep eth0 &#124; sed &#039;s=^.*:==&#039; &#124; awk &#039;&#123; print $1 &#125;&#039;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out=$(cat /proc/net/dev &#124; grep eth0 &#124; sed &#039;s=^.*:==&#039; &#124; awk &#039;&#123; print $9 &#125;&#039;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dif_in=$((in-in_old))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dif_in1=$((dif_in * 8 / 1024 / 1024 ))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dif_out=$((out-out_old))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot; IN: $&#123;dif_in&#125; bytes OUT: $&#123;dif_out&#125; bytes &quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dif_out1=$((dif_out * 8 / 1024 / 1024 ))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;IN: $&#123;dif_in1&#125; mbps OUT: $&#123;dif_out1&#125; mbps&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in_old=$&#123;in&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out_old=$&#123;out&#125;<br/>done</div>
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] Linux查看网络流量的脚本]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>