It turns out that to get dd to spit out its state you have to do a special trick with the kill command (usually used to stop un-responsive/runaway processes).
To get the info you will need two terminal windows (or you could use screen to hold the dd process).
In one terminal session start the dd process ie. dd if=/dev/sdX of=/dev/sdY.
Then in the other terminal session do this;
Lookup the process id of dd by doing typing in
pgrep -l '^dd$This will net you the process id of dd, now put the process id in the following command (in this example I got "3479 dd" as the output of "pgrep -l '^dd$")
then type in
kill -USR1 3479don't miss the -USR1 bit or you will kill the dd session.
each time you use the above command it causes dd to spit out its status into its running terminal session (that's the one you ran dd in at the start of this process), so switch over and have a look, you should see somthing like this
shadow@webX$ sudo dd if=/dev/sdX of=/dev/sdYjust hop back to the other terminal session and run the kill -USR1 ... command again each time you want to see where its up to
0+14 records in
0+14 records out
204 bytes (204 B) copied, 24.92 seconds, 0.0 kB/s
No comments:
Post a Comment