pitSTOP

monitoring the progress of “dd” command

Posted by: aneeska on: May 15, 2009

terminal

did you ever had to wait for a “dd” command? not knowing whats happening, when it will finish, how far it has reached is a terrible feeling. luckily now I know what to do. lets see what it is.

a typical dd command:

$ dd if=img-name.img of=/dev/sda

the one problem with dd is that he thinks silence is golden! he won’t say a single unless it is finished. so how to make him speak?

from another terminal issue this command

$ kill -USR1 `pidof dd`

this won’t stop dd but will make him output progress so far. he will say this may bytes got transfered so far. attaching it to a watch statement will act like a crude progress bar.

$ watch -n 10 kill -USR1 `pidof dd`

so you ready to make dd talk?


promotion :

Ad_blumblum

2 Responses to "monitoring the progress of “dd” command"

Hi, I had a problem trying to install ubuntu remix – you’re supposed to copy to the usb drive using dd, but the speed slows horribly as the copy progresses. In my case I just broke up the copy, by using the count option to limit the number of blocks I copied in one go, and using skip and seek to skip the existing written blocks.
e.g.

sudo dd if=./infile of=/dev/sdb1 bs=1M count=100
sudo dd if=./infile of=/dev/sdb1 bs=1M count=100 seek=100 skip=100
sudo dd if=./infile of=/dev/sdb1 bs=1M count=100 seek=200 skip=200
etc etc.

Worked really really fast. Not sure if my usb flash is ever going to boot though…

Leave a Reply

tweeting is a way of life!