Measure download upload with multiple interfaces

You need to measure the download or upload speed of one interface, supposing you have multiple in your gateway. I use the utility curl to measure this metrics, because curl permits to specify the interface from where i want to download or upload the files.

This shows the download speed through the interface eth1 from the site ftp.serverlinux.blogspot.com
curl –interface eth1 -w ‘\t%{speed_download}\n’ –disable-epsv -u user:pass ftp://ftp.serverlinux.blogspot.com/bigfile.iso > out.iso

This shows the upload speed through the interface eth1 to site ftp.serverlinux.blogspot.com
curl –interface eth1 -w ‘\t%{speed_upload}\n’ -T out.iso –disable-epsv -u user:pass ftp://ftp.serverlinux.blogpost.com/incoming/

The upload and download speeds are measures in kbytes.

Thanks to linux.com for their help:
http://www.linux.com/article.pl?sid=06/10/10/1824245