Wednesday, July 14, 2010

monitoring dd performance in FreeBSD

dd is a massively useful command found in various flavours of Linux and UNIX'es.

I was using dd to wipe a hard disk, and whilst the basic command itself was easy to find "dd if=/dev/random of=/dev/xxxx", where xxxx is your disk device, keeping tabs on the progress of what is likely a reasonably long wait was not.

There were quite a few sites/forums that listed using "kill -SIGUSR1 nnnnn", where nnnnn is the process id of the dd you're trying to monitor, but it didn't work on my FreeSBIE liveCD. The command is supposed to make dd return some output, and continue running, but in my case, it simply killed the process.

A little RTFM (yes, by that, I mean "man dd") later, I discovered that the equivalent signal in FreeBSD is -SIGINFO, meaning the equivalent command is "kill -SIGINFO nnnnn".

No comments: