Results 1 to 10 of 10

Thread: [SOLVED] Progress of dd

  1. #1
    Join Date
    Jul 2007
    Beans
    419
    Distro
    Ubuntu 11.04 Natty Narwhal

    [SOLVED] Progress of dd

    I love the dd command. I use it frequently to zero out hard drives and flash drives, but when i issue the command, the cursor just sits there until it is done. I have no way of knowing how far along the process is. Is there something I can include in the command to tell me how much progress the dd command has made?

  2. #2
    Join Date
    Jan 2007
    Location
    ~/PA/USA
    Beans
    1,983
    Distro
    Ubuntu

    Re: Progress of dd

    No. You would have to hack the code to include a progress bar.....

  3. #3
    Join Date
    Feb 2008
    Location
    US
    Beans
    2,782
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Progress of dd

    Quote Originally Posted by rbc View Post
    I love the dd command. I use it frequently to zero out hard drives and flash drives, but when i issue the command, the cursor just sits there until it is done. I have no way of knowing how far along the process is. Is there something I can include in the command to tell me how much progress the dd command has made?
    Yep it is even in the help file. I just ran dd --help and found this at the bottom:
    Code:
      $ dd if=/dev/zero of=/dev/null& pid=$!
      $ kill -USR1 $pid; sleep 1; kill $pid
      18335302+0 records in
      18335302+0 records out
      9387674624 bytes (9.4 GB) copied, 34.6279 seconds, 271 MB/s
    After running the kill -USR1 command it will resume the transfer.
    Desktop: Q6600 OC: 343 x 9, 4 GB RAM, 8600 GTS Twinview (22",17"), 1.5 TB RAID 5
    Laptop: Lenovo T61 T7300 @ 2 GHz, 2GB RAM, Nvidia 140M Quadro, 160 GB harddrive
    Remember to mark posts as [SOLVED] when your problem is resolved

  4. #4
    Join Date
    Jan 2007
    Location
    ~/PA/USA
    Beans
    1,983
    Distro
    Ubuntu

    Re: Progress of dd

    Quote Originally Posted by tamoneya View Post
    Yep it is even in the help file. I just ran dd --help and found this at the bottom:
    Code:
      $ dd if=/dev/zero of=/dev/null& pid=$!
      $ kill -USR1 $pid; sleep 1; kill $pid
      18335302+0 records in
      18335302+0 records out
      9387674624 bytes (9.4 GB) copied, 34.6279 seconds, 271 MB/s
    After running the kill -USR1 command it will resume the transfer.
    Thats not verbose, you have to stop the process to see the status....

  5. #5
    Join Date
    Feb 2008
    Location
    US
    Beans
    2,782
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Progress of dd

    Quote Originally Posted by cdtech View Post
    Thats not verbose, you have to stop the process to see the status....
    i never said it was the same as a verbose option. The OP just wanted a status and that is how dd --help says you should get the status. I realize it stops thing but considering that it starts itself up automatically right afterwards it is okay.
    Desktop: Q6600 OC: 343 x 9, 4 GB RAM, 8600 GTS Twinview (22",17"), 1.5 TB RAID 5
    Laptop: Lenovo T61 T7300 @ 2 GHz, 2GB RAM, Nvidia 140M Quadro, 160 GB harddrive
    Remember to mark posts as [SOLVED] when your problem is resolved

  6. #6
    Join Date
    Jul 2007
    Beans
    419
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: [SOLVED] Progress of dd

    Yeah. I saw that in the "man dd". I would have preferred the progress without stopping dd, but that's still extremely useful. Thanks all

  7. #7
    Join Date
    Apr 2007
    Location
    Copenhagen
    Beans
    146
    Distro
    Ubuntu 13.04 Raring Ringtail

    Seeing the progress of dd without stopping it

    You don't have to stop dd in order to see its progress. Just type in the command:

    Code:
    sudo kill -USR1 (PID)
    and dd will output its progress in the same terminal window where it had just been sitting with a blinking cursor prior to you issuing the command.

    You can get the PID of the dd process by issuing the command ps -A | grep dd and finding dd in that list. For example:

    Code:
    rune@runescomp:~$ ps -A | grep dd
        2 ?        00:00:00 kthreadd
     5396 ?        00:00:00 dd
     5745 ?        00:00:00 winbindd
     5814 ?        00:00:00 winbindd
     5896 ?        00:00:01 hald-addon-usb-
     5903 ?        00:00:00 hald-addon-inpu
     5910 ?        00:00:00 hald-addon-cpuf
     5911 ?        00:00:00 hald-addon-acpi
     5980 ?        00:00:00 btaddconn
     7959 pts/1    00:04:36 dd
    The last process is dd and its PID is the number in the leftmost column (7959).

    Issuing the command sudo kill -USR1 7959 makes dd output its status in the terminal where it is running:

    Code:
    rune@runescomp:~$ sudo dd if=/dev/zero of=/dev/sdb
    [sudo] password for rune: 
    141955993+0 records in
    141955993+0 records out
    72681468416 bytes (73 GB) copied, 2802,29 s, 25,9 MB/s
    Last edited by runesvend; October 11th, 2008 at 10:41 AM. Reason: post title

  8. #8
    Join Date
    Oct 2010
    Location
    U.S.
    Beans
    10

    Re: [SOLVED] Progress of dd

    in case ppl happen upon this post via google.

    Code:
    sudo dd if=/dev/zero bs=2048 | pv -s 500G | sudo dd bs=2048 of=/dev/sdb
    set pv -s to the size of the disk you are zeroing out.

    see http://www.commandlinefu.com/command...and-statistics

  9. #9
    Join Date
    Jan 2012
    Beans
    26

    Re: [SOLVED] Progress of dd

    How To: Monitor the progress of dd
    http://www.serenux.com/2011/02/howto...rogress-of-dd/

    Even provides info on using the watch command to get regular updates of dd status while it's running.


    Basically, once dd is running you open a second temrinal and type
    Code:
    sudo kill -USR1 `pgrep ^dd`
    and the output pops up in the dd terminal without halting the process.

    To get regular updates, use
    Code:
    watch -n5 'sudo kill -USR1 `pgrep ^dd`'

    where -n equals the number of seconds between updates (-n5 equal 5 second updates)
    Last edited by jsavga; November 10th, 2012 at 08:50 PM.

  10. #10
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: [SOLVED] Progress of dd

    Thread Closed - Necromancy

    But from another really old thread.

    from caljohnsmith post #7
    I would recommend using "dcfldd", which is basically dd with more features; it has the really useful feature of showing the copying progress
    http://ubuntuforums.org/showthread.php?t=1033712
    http://www.anti-forensics.com/disk-wiping-with-dcfldd
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •