summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFederico Simoncelli <fsimonce@redhat.com>2014-09-26 17:12:32 +0000
committerPádraig Brady <P@draigBrady.com>2014-09-30 16:08:43 +0100
commitaf2a4ed22594badd2719c0123441d69b17bd8328 (patch)
tree7b27a3c86f8d6d75b4b8f6cead88e9b6f1378958 /doc
parent27d2c7383f18d0f59b0d096f156ed6cb1677642b (diff)
downloadcoreutils-af2a4ed22594badd2719c0123441d69b17bd8328.tar.xz
dd: new status=progress level to print stats periodically
* src/dd.c: Report the transfer progress every second when the new status=progress level is used. Adjust the handling and description of the status= option so that they're treated as mutually exclusive levels, rather than flags with implicit precedence. * doc/coreutils.texi (dd invocation): Document the new progress status level. Reference the new level in the description of SIGUSR1. * tests/dd/stats.sh: Add new test for status=progress. * tests/dd/misc.sh: Change so status=none only takes precedence if it's the last level specified. * NEWS: Mention the feature.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi27
1 files changed, 19 insertions, 8 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 7d32af582..03bb710e9 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -8631,24 +8631,32 @@ will ensure that @samp{count=} corresponds to complete input blocks
rather than the traditional POSIX specified behavior of counting
input read operations.
-@item status=@var{which}
+@item status=@var{level}
@opindex status
Transfer information is normally output to stderr upon
receipt of the @samp{INFO} signal or when @command{dd} exits.
-Specifying @var{which} will identify which information to suppress.
+Specifying @var{level} will adjust the amount of information printed,
+with the last @var{level} specified taking precedence.
@table @samp
-@item noxfer
-@opindex noxfer @r{dd status=}
-Do not print the transfer rate and volume statistics
-that normally make up the last status line.
-
@item none
@opindex none @r{dd status=}
Do not print any informational or warning messages to stderr.
Error messages are output as normal.
+@item noxfer
+@opindex noxfer @r{dd status=}
+Do not print the final transfer rate and volume statistics
+that normally make up the last status line.
+
+@item progress
+@opindex progress @r{dd status=}
+Print the transfer rate and volume statistics on stderr,
+when processing each input block. Statistics are output
+on a single line at most once every second, but updates
+can be delayed when waiting on I/O.
+
@end table
@item conv=@var{conversion}[,@var{conversion}]@dots{}
@@ -9003,7 +9011,7 @@ dd conv=noerror,sync iflag=fullblock </dev/sda1 > /mnt/rescue.img
Sending an @samp{INFO} signal (or @samp{USR1} signal where that is unavailable)
to a running @command{dd} process makes it print I/O statistics to
-standard error and then resume copying. In the example below,
+standard error and then resume copying. In the example below,
@command{dd} is run in the background to copy 5GB of data.
The @command{kill} command makes it output intermediate I/O statistics,
and when @command{dd} completes normally or is killed by the
@@ -9033,6 +9041,9 @@ The above script will output in the following format
5000000000 bytes (5.0 GB) copied, 0.630785 s, 7.9 GB/s
@end example
+Note also the @samp{status=progress} option which periodically updates
+the last line of the transfer statistics above.
+
@vindex POSIXLY_CORRECT
On systems lacking the @samp{INFO} signal @command{dd} responds to the
@samp{USR1} signal instead, unless the @env{POSIXLY_CORRECT}