James Bowes

Purveyor of Pre-eminent Programmes

Measuring Network Speeds with Netcat and Dd

with 6 comments

I’ve seen a few posts on the web about testing your network speeds with netcat, but they all seem to not work with recent versions of netcat.

On one machine, run:

nc -v -l 2222 > /dev/null

(Make sure you’re not blocking connections to 2222!)

On a second machine, run:

dd if=/dev/zero bs=1024K count=512 | nc -v $IP_OF_FIRST_MACHINE 2222

dd will give you your speed:

536870912 bytes (537 MB) copied, 4.87526 s, 117 MB/s

Yay, gigabit!


ymmv, test with /dev/zero at your own risk. Speak with your NOC before starting any network infrastructure changes.

About these ads

Written by jbowes

October 13, 2010 at 9:18 am

Posted in tech

6 Responses

Subscribe to comments with RSS.

  1. Have you considered using iperf?

    Martin

    October 13, 2010 at 9:39 am

  2. iperf isn’t better solution ?

    Łukasz Jagiełło

    October 13, 2010 at 11:10 am

    • iperf seems to work just fine (I hadn’t known about it before Martin’s reply).

      jbowes

      October 13, 2010 at 11:20 am

  3. ttcp is also really good for testing line speeds between two machines.

    Stick

    October 14, 2010 at 11:59 am

  4. [...] used jbowes method of performance testing. I ran nc on the [...]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: