Pipeviewer

This post appeared originally in our sysadvent series and has been moved here following the discontinuation of the sysadvent microsite

pv is a nice little tool that will take stdin and make a nice little progress bar and displaying time elapsed, percentage completed (if size is known) current throughput rate and the total data transferred and with an ETA.

So if you have a tool that can output it’s result on standard output or read from standard input, one can get a progress bar!

It’s nice to know that “data is flowing”.

Example session

Other examples

Send file with Netcat and get a nice progress-bar:

pv file | nc -w 1 example.com 3000

Get progress bar on tar output:

tar zcf - /directory | pv > backup.tar.gz

MySQL dump/restore:

mysqldump database | pv > database.sql
pv database.sql | mysql database

Limit the transfer rate and size of data over a pipe

cat /dev/zero | pv -L 3m -Ss 100m > /dev/null

Fredrik Steen

Former Operations Manager at Redpill Linpro

Thoughts on the CrowdStrike Outage

Unless you’ve been living under a rock, you probably know that last Friday a global crash of computer systems caused by ‘CrowdStrike’ led to widespread chaos and mayhem: flights were cancelled, shops closed their doors, even some hospitals and pharmacies were affected. When things like this happen, I first have a smug feeling “this would never happen at our place”, then I start thinking. Could it?

Broken Software Updates

Our department do take responsibility for keeping quite a lot ... [continue reading]

Alarms made right

Published on June 27, 2024

Just-Make-toolbox

Published on March 22, 2024