I have to dd
a couple of 1TB hard drives. They are taking several hours to clone and I was wondering if there was any way possible of knowing how fast they are going, how much they have done and how long will they take to copy the rest.
All I can see is the terminal with the command running. When I run ps -e
at least I know that dd
is working from the CPU usage shown, but I have no way of knowing how much it has done or how long it will take to finish.
Kind of makes me crazy.
Typical. When I ask something I then find the answer somehow (even if I looked for hours.. but magically I find it AFTER creating the question -.- ). Anyway for what I checked with
dd --help
which mentions at the end of the help (I can't really believe I did not see THAT) the following:What this means is that in another terminal you would run the following line using the Process ID of the DD you want to check. For example in my case is Process Id 4112. You can see the process ID by typing
ps -e
and looking for dd or justps -e|grep dd
and looking at the number in the front. Take note of that number and then type in another terminal windowkill -USR1 4112; sleep 1;
This will give me the time, seconds elapsed since it began and how much is has copied. At least now I know it takes about 8 hours to copy 1TB of information at about 40MB/s.Use the program
pv
for any piped stream to see a live report of data transfered. It can be used for any application using pipes. It is also a great tool for seeing rate of transfer to things like USB, External disks, networked computers.Or for direct copying, just use this:
Example:
Regarding using kill to display info on a Mac, you have to pass it the
-INFO
flag instead of the-USR1
flag. And remember that it shows the info in the terminal where your dd process is running, so if you open a new tab to typekill -INFO $PID
(where$PID
is the number you found usingps -e | grep dd
), you'll have to switch back to the tab wheredd
is running to see the output.Now if only I could figure out how to display that output as GB or MB instead of plain bytes...
There is already another extended dd called
dcfldd
that do many funny stuff as this you are asking for http://dcfldd.sourceforge.net/sudo apt-get install dcfldd
dd
you writedcfldd