# Watch status of running dd disc clone



## tulamidan (Aug 18, 2019)

Hello
I have started a dd clone 

```
dd if=/dev/raid5/raidp1 of=/dev/ad8
```

And it keeps running for quite a while now. And I'd like to estimate if the process is still working and how long it might take to finish.

Top suggests that all is still fine:

```
PID USERNAME      THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
 1923 root            1  -8    0  3128K   840K physrd 2  65:48 11.57% dd
```
where physrd and physwrt keep switching.

but 

```
freenas:~# pkill -INFO -x dd
freenas:~# kill -INFO 1923
```

show absolutely nothing. Is there some other way to show the progress?


----------



## Phishfry (Aug 18, 2019)

If you look at the manual for dd(1) you will see it has a status component.


> status=value


dd if=/dev/raid5/raidp1 of=/dev/ad8 status=progress


----------



## k.jacker (Aug 18, 2019)

You can at any time press _^_t while `dd` is running in your terminal


----------



## m0nkey_ (Aug 18, 2019)

I like to use something called `pv`.

`dd if=/dev/source | pv | dd of=/dev/destination`


----------



## Eric A. Borisch (Aug 18, 2019)

m0nkey_ said:


> I like to use something called `pv`.
> 
> `dd if=/dev/source | pv | dd of=/dev/destination`



If you know how big the transfer is going to be, you can use `pv -s 12345` to get completion % / estimated time remaining.


----------



## CraigHB (Aug 18, 2019)

Good info, can't say how many times I've sat there wondering when a dd job was going to finish.


----------



## tulamidan (Aug 18, 2019)

Thanks for your responses. Next time I will start a job I keep in mind to add the progress flag.
I have read that pv slows down the copy of the process, can anyone confirm?


----------



## tingo (Aug 18, 2019)

dd(1) also supports the status= option like status=progress which might be helpful in some cases...


----------



## moridin (Aug 18, 2019)

Not-so-useful remark: a default `bs` is 512 bytes, you should really use something bigger (1M?).


----------



## tingo (Aug 18, 2019)

That is a useful reminder. I routinely use bs=4M when copying to usb memory sticks, for example.


----------



## Eric A. Borisch (Aug 18, 2019)

tulamidan said:


> Thanks for your responses. Next time I will start a job I keep in mind to add the progress flag.
> I have read that pv slows down the copy of the process, can anyone confirm?



Unless you are doing a memory device to memory device copy, I would expect not. In some cases, having an elastic buffer between your input an output device can make it faster. (You can adjust the size of pv’s buffer, or use mbuffer which also serves that purpose.)


----------



## badbrain (Aug 21, 2019)

Use GNU ddrescue. It's better than dd.


----------

