Using the pipe viewer (pv) utility, I can visually monitor the data flow going through a pipe.

I would however like to be able to log the data flow in a file instead of dynamically viewing it in a terminal. (Say, one line per second).

Is this at all possible? Or better yet, is there an utility better suited to do this, with a greater degree of accuracy (for example, recalculating and logging the throughput for windows of say, 50ms)?

1 Answer 1


I'm not sure I understand correctly.

We have tee, which display the pipe and it log in a file, so you could use | tee log.file | pv | ....

Or you can duplicate descriptors in shell and handle them differently.

For other cases, it is often easier to build a small script which do what you need.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .