How to monitor progress of a dd operation

How to monitor progress of a dd operation

By default dd doesn’t display any status information while performing its operation. Newer versions (>8.24) include a status parameter which can be used to activate progress output. For example:

dd if=/dev/zero of=/dev/sde bs=10M status=progress

For older versions the classic kill -USR1 method still works and will output a numbers progress each time it’s called. In the example below we use watch to call it and display output every 5 seconds:

watch -n5 'killall -USR1 dd'

Additionally, pv can be used to intermediate the data transfer and monitor progress. In this case the total size parameter should be passed to the pv command (for example 100G(b), 3T(b), so on):

dd if=/dev/zero | pv -s 100G | dd of=/dev/sde bs=10M

Warning: Extreme care should be taken when running dd with device identifiers as they can lead to data loss. The examples above will erase all data on the sde storage device.

Leave a Reply