Re: How come dd if=/dev/zero of=/nfs/dev/null does not send packetsover the network?

From: Arthur Perry
Date: Wed Jun 02 2004 - 15:47:08 EST


If your goal is to simply push the network (and here I am assuming you are
just using nfs for that reason simply because it seemed easy to set up and
do), and using nfs to create an actual file on disk on the other side
isn't going to be fast enough, try using netcat instead.. no nfs.

You can have netcat listen on a socket at the receiving end and redirect
to /dev/null. It is initiated on the recieving end, thus /dev/null will be
referenced by that machine.
You then can connect to it on the sending end with netcat and source from
your /dev/zero.

I used to do this, and use 'time' to determine how long it took to move xx
bytes.
It's a quick and dirty really.. But works well for rough approximations.

Arthur Perry
Lead Linux Developer / Linux Systems Architect
Validation, CSU Celestica
Sair/Linux Gnu Certified Professional
Providing professional Linux solutions for 7+ years



On Wed, 2 Jun 2004, Piszcz, Justin Michael wrote:

> root@jpiszcz:~# mkdir /p500/dev
> root@jpiszcz:~# mount 192.168.0.253:/dev /p500/dev
> root@jpiszcz:~# echo blah > /p500/dev/null
> root@jpiszcz:~# ls -l /p500/dev/null
> crw-rw-rw- 1 root sys 1, 3 Jul 17 1994 /p500/dev/null
> root@jpiszcz:~# dd if=/dev/zero of=/p500/dev/null
>
> 6179737+0 records in
> 6179736+0 records out
>
> Instead it treats it as a local block device?
>
> Kernel 2.6.5.
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/