Pipe Viewer
ivarch.com
ivarch.com
tail -f query.log | pv -tri 1 > /dev/null
stty status '^T'
fsck also responds to SIGINFO by printing its status. I had to hack up rsync to do it (http://jcs.org/patches/rsync-show_current_file.diff), and I wish more utilities supported it by default.I was under the assumption that pipes do not know how much total data is on its way?
I use multiple pv instances to track compression/decompression rates, and overall progress, for tarballs. Using the "-c" code for console codes keeps the instances from stomping over each other's output.
Example: https://gist.github.com/2783910
(hell it could even use splice() and never even see the bytes)
pv -f *.sql.gz | zcat | mysql db_instance_name
http://news.ycombinator.com/item?id=3626020
http://news.ycombinator.com/item?id=3198572
I'm sure there were older stories too. IIRC I saw it on HN longer than 6 months ago, but I couldn't find that submission in a cursory search.
pv /dev/zero > /dev/nullmy throughput from yes is 49MB/s whereas from /dev/zero it's 12GB/s