Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

There is a shell command that allows to measure how fast the data goes through it, so you can measure the speed of output of commands in a pipe. So instead of:

$ somecommand | anothercommand

you can do something like:

$ somecomand | ??? | anothercommand

And throughput stats (bytes/sec) are prited to stderr, I think. But I can't for the life of me remember what that command was.

Hints?

share|improve this question
add comment

2 Answers 2

up vote 26 down vote accepted

cpipe is probably better for these purposes, but another related program is pv (Pipe Viewer):

Screenshot of pv from the pv homepage

If you give it the --rate flag it will show the transfer rate

share|improve this answer
    
That was the one! –  Alex B Sep 4 '10 at 10:55
add comment

You need a utility called cpipe.

Usage:

tar cCf / - usr | cpipe -vr -vw -vt > /dev/null

Output:

...
  in:  19.541ms at    6.4MB/s (   4.7MB/s avg)    2.0MB
 out:   0.004ms at   30.5GB/s (  27.1GB/s avg)    2.0MB
thru:  19.865ms at    6.3MB/s (   4.6MB/s avg)    2.0MB
... 
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.