Sending  a  USR1  signal  to  a running 'dd' process makes it print I/O
statistics to standard error and then resume copying.

   $ 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

I take it that the "sleep 1" is just to allow it time to respond to the -USR1 signal and the "kill $pid" is to knock it back into gear?

You're right about the sleep. The final kill is because the dd command in the example would run forever.

Barry



--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie

Reply via email to