Tag Archives: image

Checking the progress of ‘dd’

Update 2: Version 8.24 of dd (from coreutils) supports checking the status of dd with the status=progress option (thanks to R for letting me know).

[17:41 chris ~]$ dd if=/dev/zero of=/tmp/file conv=noerror status=progress
697583104 bytes (698 MB) copied, 1.000000 s, 698 MB/s

Update: See comments for a much better (and prettier!) way to do it with pipe viewer. Thanks Bill!

So you’re wiping a drive or writing an image using ‘dd‘ (dataset definition) and you’re not sure where it’s up to. There’s no built in way to check the progress (until it’s finished), so I use kill and pgrep.

On one terminal, run your dd command., something like this:
dd if=/dev/zero of=/dev/sdX bs=4096

On a second terminal, run the following:
kill -USR1 $(pgrep ^dd)

Back on terminal one, it should spit out where it’s up to but keep on dd’ing away, like so:
2202+0 records in
2202+0 records out
2308964352 bytes (2.3 GB) copied, 24.3584 s, 94.8 MB/s

This only works with one instance, for multiple instances get the right dd or use a for loop to check them all.