<?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/"
	>

<channel>
	<title>damontimm.com &#187; nc</title>
	<atom:link href="http://blog.damontimm.com/tag/nc/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.damontimm.com</link>
	<description>Where I go to remember what I did</description>
	<lastBuildDate>Fri, 16 Jul 2010 18:51:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How To: Test Connection Speed Between Two Machines</title>
		<link>http://blog.damontimm.com/how-to-test-connection-speed-between-two-machines/</link>
		<comments>http://blog.damontimm.com/how-to-test-connection-speed-between-two-machines/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 14:58:26 +0000</pubDate>
		<dc:creator>Damon</dc:creator>
				<category><![CDATA[how to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[nas]]></category>
		<category><![CDATA[nc]]></category>
		<category><![CDATA[pv]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.damontimm.com/?p=166</guid>
		<description><![CDATA[Purpose: as a quick diagnostic tool, sometimes it&#8217;s nice to know exactly how fast two machines can (theoretically) be connected.  I was having some slow downs on my NAS and using these command line tools, was able to determine that it was my NIC (and not my hard drives) that was causing the slow down.  [...]]]></description>
			<content:encoded><![CDATA[<p>Purpose: as a quick diagnostic tool, sometimes it&#8217;s nice to know exactly how fast two machines can (theoretically) be connected.  I was having some slow downs on my NAS and using these command line tools, was able to determine that it was my NIC (and not my hard drives) that was causing the slow down.  I learned this from a <a href="http://tech.slashdot.org/comments.pl?sid=1064679&amp;cid=26139847" target="_blank">thread at slashdot</a>. </p>
<p><span id="more-166"></span></p>
<h3>install nc and pv</h3>
<p>If you are on a mac, you can use <a href="http://blog.damontimm.com/how-to-install-macports-on-os-x-leopard-105/">MacPorts</a> to install this easily enough:</p>
<ul class="terminal">
<li><code>$ sudo port install netcat pv</code></li>
</ul>
<p>If you are on Ubuntu, you just need to get <code>pv</code> installed (<code>nc</code> is already there):</p>
<ul class="terminal">
<li><code>$ sudo aptitude install pv</code></li>
</ul>
<p>Once you have <code>nc</code> and <code>pv</code> installed, it&#8217;s really simple.  On one machine, run the following command:</p>
<ul class="terminal">
<li><code>$ nc -ulp 5000 &gt; /dev/null</code></li>
</ul>
<p>On the second machine run the following command (you need the IP address of the first machine):</p>
<ul class="terminal">
<li><code>$ pv &lt; /dev/zero | nc -u ip.addy.of.other.machine 5000</code></li>
</ul>
<p>And you should get some output with a little &lt;=&gt; sign moving across the screen that resembles this (static):</p>
<pre class="brush: text;">1.15GB 0:00:19 [ 218MB/s] [             &lt;=&gt;                  ]</pre>
<p>This will show you the number of MB/s the connection is averaging; if you watch if for a bit, you can get an idea of where things stand.  Here are some of the results I got between my PowerMac, PowerBook, and EEE PC:</p>
<pre class="brush: text;">localhost:                      218MB/s
gigabit Ethernet:               143MB/s
100MB ethernet:                 11.5MB/s
wireless (poor connection):     141kB/s</pre>
<p>If you read the <a href="http://tech.slashdot.org/comments.pl?sid=1064679&amp;cid=26139847">original post on slashdot</a>, it seems you can us pv to measure a lot of other stuff as well &#8212; I haven&#8217;t played with it yet but should, one day.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.damontimm.com/how-to-test-connection-speed-between-two-machines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
