<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Dobby's World &#187; throughput</title>
	<atom:link href="http://dobbylove.wordpress.com/tag/throughput/feed/" rel="self" type="application/rss+xml" />
	<link>http://dobbylove.wordpress.com</link>
	<description>Welcome ~ ! ~^^~</description>
	<lastBuildDate>Wed, 09 Jul 2008 10:52:29 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='dobbylove.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/fe9cf3dae4f40c89501ef77c0f766130?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Dobby's World &#187; throughput</title>
		<link>http://dobbylove.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dobbylove.wordpress.com/osd.xml" title="Dobby&#8217;s World" />
		<item>
		<title>Measure the throughput of TCP-based application</title>
		<link>http://dobbylove.wordpress.com/2008/07/05/measure-the-throughput-of-tcp-based-application/</link>
		<comments>http://dobbylove.wordpress.com/2008/07/05/measure-the-throughput-of-tcp-based-application/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 13:52:00 +0000</pubDate>
		<dc:creator>Xiaofei Wang</dc:creator>
				<category><![CDATA[NS2]]></category>
		<category><![CDATA[measure]]></category>
		<category><![CDATA[tcp]]></category>
		<category><![CDATA[throughput]]></category>

		<guid isPermaLink="false">http://dobbylove.wordpress.com/2008/07/05/measure-the-throughput-of-tcp-based-application/</guid>
		<description><![CDATA[TCP流量的取得,先修改添加tcpsink,然后用perl脚本对tcpsink的trace进行分析:
 如下:
[Preparation for tcpsink]
1. Follow the steps of method2 at http://140.116.72.80/~smallko/ns2/tool_en.htm
2. Download mtcpsink.cc, mtcpsink.h
3. Put these two files into measure folder
4. Add the “measure/mtcpsink.o” in the OBJ_CC of Makefile
5. make clean; make
In tcl file:
&#8230;
set tcp1 [new Agent/TCP/Reno]
$ns attach-agent $s1 $tcp1
set tcpsink1 [new Agent/TCPSink/mTcpSink]
$tcpsink1 set_filename tcp_sink
$ns attach-agent $wl_node_(0) $tcpsink1
$ns connect $tcp1 $tcpsink1
set ftp1 [$tcp1 attach-source FTP]
&#8230;.
After [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dobbylove.wordpress.com&blog=4152724&post=29&subd=dobbylove&ref=&feed=1" />]]></description>
		<wfw:commentRss>http://dobbylove.wordpress.com/2008/07/05/measure-the-throughput-of-tcp-based-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c237669fde1a9833f0bd7b42fed6721b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dobbylove</media:title>
		</media:content>
	</item>
		<item>
		<title>Get the system throughput for UDP-based application</title>
		<link>http://dobbylove.wordpress.com/2008/07/05/get-the-system-throughput-for-udp-based-application/</link>
		<comments>http://dobbylove.wordpress.com/2008/07/05/get-the-system-throughput-for-udp-based-application/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 01:12:00 +0000</pubDate>
		<dc:creator>Xiaofei Wang</dc:creator>
				<category><![CDATA[NS2]]></category>
		<category><![CDATA[measure]]></category>
		<category><![CDATA[throughput]]></category>
		<category><![CDATA[udp]]></category>

		<guid isPermaLink="false">http://dobbylove.wordpress.com/2008/07/05/get-the-system-throughput-for-udp-based-application/</guid>
		<description><![CDATA[非常有用的很直接能看到flow的throughput的修改.利用loss-monitor,记录第一个包和最后一个包的抵达时间,然后计算出流量. 用于UDP.

A. Modification:
1. Modify the tools/loss-monitor.h
class LossMonitor : public Agent {
public:
LossMonitor();
virtual int command(int argc, const char*const* argv);
virtual void recv(Packet* pkt, Handler*);
protected:
int nlost_;
int npkts_;
int expected_;
int bytes_;
int seqno_;
double last_packet_time_;
//add the following two lines
double first_packet_time_;
int first;
};
2. Modify the tools/loss-monitor.cc
LossMonitor::LossMonitor() : Agent(PT_NTYPE)
{
bytes_ = 0;
nlost_ = 0;
npkts_ = 0;
expected_ = -1;
last_packet_time_ = 0.;
first_packet_time_ = 0.;
first=0;
seqno_ = 0;
bind(&#8220;nlost_&#8221;, &#38;nlost_);
bind(&#8220;npkts_&#8221;, &#38;npkts_);
bind(&#8220;bytes_&#8221;, &#38;bytes_);
bind(&#8220;lastPktTime_&#8221;, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dobbylove.wordpress.com&blog=4152724&post=28&subd=dobbylove&ref=&feed=1" />]]></description>
		<wfw:commentRss>http://dobbylove.wordpress.com/2008/07/05/get-the-system-throughput-for-udp-based-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c237669fde1a9833f0bd7b42fed6721b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dobbylove</media:title>
		</media:content>
	</item>
	</channel>
</rss>