Here is a Unix command I often yearn for. Let’s call it glimpse. You put it into a pipeline and it provides a glimpse of what’s happening in that pipeline. In it’s simplest form it would work just use termcap to show what’s happening; overwriting a single line in the terminal with the lines flowing thru the pipeline. If a window system was to be found it could pop up a transient window showing a bit of what’s flowing past. Extra points for charting, progress displays, filtering, etc.
I have a very primitive version:
#!/bin/sh
trap 'rm -rf /tmp/glimpse.$$*' EXIT
FIFO=/tmp/glimpse.$$.fifo
mkfifo $FIFO
xterm -title glimpse -fg blue -e sh -c "cat $FIFO ; sleep 30" &
tee $FIFO
Which presumes you have X11 at hand. This has the advantage that it will work across ssh connections. For example: tail -f /var/log/messages | glimpse > /dev/null
Update: pv mentioned in the comments is sweet! Thanks Ted!
I think some of what you’re looking for can be done with pv (pipe viewer): http://www.ivarch.com/programs/quickref/pv.shtml
It doesn’t show the actual content that’s moving through the pipe, but you can get all kinds of interesting stats on it. Here’s a recent blog post showing it’s use: http://www.catonmat.net/blog/unix-utilities-pipe-viewer/