cp like program with transfer speed

Hi all,

Is there a cp like copy program that displays transfer speeds.

I see several cp like pgms in the ports but none of them state anything about transfer speeds.

Thanks

O-yea, FBSD 7.1-R, No X!

-Enjoy
fh : )_~
 
You can try net/rsync with a --progress flag. Output looks like this:

Code:
$ rsync --progress n1* a/
created directory a
n1124.pdf
     3487138 100%   10.59MB/s    0:00:00 (xfer#1, to-check=3/4)
n1169.pdf
      373895 100%  973.68kB/s    0:00:00 (xfer#2, to-check=2/4)
n1256.pdf
     3788603 100%    4.98MB/s    0:00:00 (xfer#3, to-check=1/4)
n1336.pdf
     3793665 100%    3.43MB/s    0:00:01 (xfer#4, to-check=0/4)

sent 11444941 bytes  received 88 bytes  7630019.33 bytes/sec
total size is 11443301  speedup is 1.00
 
You can monitor speed with $ gstat or $ systat -iostat 1
You can even use scp on localhost.
 
ale said:
You can monitor speed with $ gstat or $ systat -iostat 1
You can even use scp on localhost.

Thank you for your suggestions, but, been there done them!

I find $ systat -iostat info interesting but looking at a scale and making a best guess of performance is not my idea of usefull, I like solid numbers!

$ gstat gives numbers, what they are I have yet to decifer fully, the color is very annoying, especially if it exits while writing color, and I have yet to get the filter to work, likly my lack of understanding!

I don't see how scp shows transfer rate.

Thank you!

-Enjoy
fh : )_~
 
FestusHagen said:
Thank you for your suggestions, but, I don't see how scp shows transfer rate.
Code:
$ scp /usr/ports/packages/All/docbook-xsl-1.74.0_1.tbz ale@localhost:/tmp
docbook-xsl-1.74.0_1.tbz                      100%   33MB  10.9MB/s   00:03    

$ scp -r mp3/Nine\ Inch\ Nails\ -\ The\ Slip ale@localhost:
01 999,999.mp3                                100% 3060KB   3.0MB/s   00:00    
02 1,000,000.mp3                              100% 8289KB   8.1MB/s   00:00    
03 Letting You.mp3                            100% 8265KB   8.1MB/s   00:00    
04 Discipline.mp3                             100% 8468KB   8.3MB/s   00:01    
05 Echoplex.mp3                               100% 8841KB   8.6MB/s   00:00    
06 Head Down.mp3                              100% 9236KB   9.0MB/s   00:00    
07 Lights in the Sky.mp3                      100% 4752KB   4.6MB/s   00:01    
08 Corona Radiata.mp3                         100%   12MB  12.0MB/s   00:00    
09 The Four of Us are Dying.mp3               100% 8378KB   8.2MB/s   00:00    
10 Demon Seed.mp3                             100% 9851KB   9.6MB/s   00:01    
theslip.pdf                                   100% 7519KB   7.3MB/s   00:00
 
ale said:
Code:
$ scp /usr/ports/packages/All/docbook-xsl-1.74.0_1.tbz ale@localhost:/tmp
docbook-xsl-1.74.0_1.tbz                      100%   33MB  10.9MB/s   00:03

I get nothing with scp, I don't see a difference between cp and scp... Guess I'm missing something.

Thanks

-Enjoy
fh : )_~
 
FestusHagen said:
I get nothing with scp, I don't see a difference between cp and scp... Guess I'm missing something.
From the scp man page:
Code:
-q      Disables the progress meter.
so, unless you are using an alias or something else, if you are not using -q it should display a progress meter.
Is your $ $ which scp /usr/bin/scp?
 
FestusHagen said:
Yup, That's the one, used no option args.
Just:
Code:
/usr/bin/scp /source /destination

Thanks

-Enjoy
fh : )_~
And what with
Code:
/usr/bin/scp /source $USER@$HOSTNAME:/destination
as in my examples?
 
ale said:
And what with
Code:
/usr/bin/scp /source $USER@$HOSTNAME:/destination
as in my examples?

That works, but I purposly left out the user@host due to the fact that it then requires authentication, I don't need nor want authentication.

It's use will be in scripts.

Thank you for your help.

-Enjoy
fh : )_~
 
If you're wanting to test a new harddrive or something I'd recommend dd(1).

To test write speed:

Code:
$ dd bs=4096 count=20000 if=/dev/zero of=$HOME/testcrap
20000+0 records in
20000+0 records out
81920000 bytes transferred in 1.301245 secs (62955094 bytes/sec)

I'm not sure exactly how accurate this is reading from /dev/zero. I'm not sure if disk drives can write zeroes faster than ones or anything. Seems far fetched but possible.

To test read speed (notice that this time "testcrap" is in the filesystem cache and thus gets read very very quickly):

Code:
$ dd bs=4096 count=20000 if=$HOME/testcrap of=/dev/null
20000+0 records in
20000+0 records out
81920000 bytes transferred in 0.057060 secs (1435681656 bytes/sec)

In both of those examples change the count parameter to write a larger or smaller file. I'd leave blocksize (bs) alone.

A seemingly related tip is that in FreeBSD cp(1) supports SIGINFO. Typically you can send SIGINFO to a process by pressing ^T while it's running. For cp(1) it shows the transfer status, though it does not include transfer rate.
 
Back
Top