# How can I measure throughput of my nfs and samba?



## tanakorn (Jun 25, 2010)

I export my disk as an nfs and samba and I want to know how can I measure my nfs and my samba throughput.

I try to use nfsstat but it doesn't show about it.

Does anyone know how can I find these values?


----------



## phoenix (Jun 25, 2010)

Create a large file of random data:
`# dd if=/dev/random of=/path/to/nfs/export/bigfile.100M bs=1M count=100`

On the server, run iftop or trafshow to monitor the traffic going through a NIC:

```
# pkg_add -r iftop
# iftop -n -i mynic0
```

From an NFS client, copy that file to a local filesystem, and watch the speeds that appear in iftop/trafshow.

Do the same from a samba client.


----------



## Alt (Jun 26, 2010)

Also you can monitor interface load with [cmd=]systat -ifs[/cmd] (write :scale mbit to show in megabits)


----------



## tanakorn (Jun 28, 2010)

The throughput that I mean is current throughput, not the maximum throughput. The method that you recommended me can't use. I don't think measure throughput by monitor interface is work because I use the same interface for my nfs disk and samba.

The throughput that measure by this way is the throughput of nfs + samba + other services, isn't it?


----------



## Matty (Jun 30, 2010)

```
netstat -Iem0 -w1 -h
```


----------

