Showspeed

Showspeed

Unix is modular. The command line shell is an outstanding example of a modular design. This is by philosophy. Each program should do only one thing, but do one thing well. And all the small programs are pluggable to form pipelines for more complex tasks.

So much for history. Some old sysadmins may remember to have heard that in school. But most people nowadays do complex software. Even the good old simple commands grow additional commands. And yes, users are unhappy when they don’t.

Example: google for “progress indicator cp dd” you will get hundreds of postings that suggest to add a ‘percentage’, or some form of ‘bytes per seconds’ to all the copying commands. rsync -p does it.

Instead of suggesting to add a --progress option or similar to programs, that may take a while, I wrote a program, that does nothing else except showing progress.

My tool is called showspeed and it is available from https://github.com/jnweiger/showspeed

Example:

$ dd if=bigfile of=/tmp/otherbigfile &
$ showspeed dd
dd looks like a process name. pid=4417 matches av0=dd.
p/4417/fd/0r /home/jw/bigfile 113MB/s (12%, 2.3GB)  9m:35
p/4417/fd/1w /tmp/otherbigfile 182MB/s (2.6GB)
p/4417/fd/0r /home/jw/bigfile 285MB/s (15%, 3.0GB)  8m:08
p/4417/fd/0r /home/jw/bigfile 115MB/s (16%, 3.2GB)  8m:01
p/4417/fd/0r /home/jw/bigfile 107MB/s (17%, 3.4GB)  7m:39
p/4417/fd/1w /tmp/otherbigfile 104MB/s (3.5GB)
p/4417/fd/0r /home/jw/bigfile 139MB/s (19%, 3.7GB)  7m:37
p/4417/fd/0r /home/jw/bigfile 116MB/s (20%, 3.9GB)  7m:18
p/4417/fd/1w /tmp/otherbigfile  67MB/s (4.0GB)
p/4417/fd/1w /tmp/otherbigfile 100MB/s (4.1GB)

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s