bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dd (coreutils) 5.97 used power of 10 not 2 for calculating MB


From: Olivier Delhomme
Subject: Re: dd (coreutils) 5.97 used power of 10 not 2 for calculating MB
Date: Thu, 15 Feb 2007 20:43:39 +0100

Le Wed, 14 Feb 2007 15:13:14 -0800, Paul Eggert disait :

> Olivier Delhomme writes:
> 
> >  3. used with "quiet" parameter it turns off the output (stated
> >     a long time ago here : 
> >     http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165045).
> 
> OK, but status=noxfer does that already, so I'm still a bit confused.

The status=noxfer only hides the statistic line (the last one). The quiet
parameter does not allow any output from dd.

> >  2. used with "human" parameter the classic output is turned
> >     into a human readable format
> 
> We should distinguish here between longstanding output (which I would
> call "classic") and GNU output.  For example, on Solaris 10,

We are talking about the same thing.

> /usr/bin/dd has the "classic" output:
> 
>    $ gnudd if=/dev/zero of=/dev/null bs=128k count=1000
>    1000+0 records in
>    1000+0 records out
>    131072000 bytes (131 MB) copied, 0.0981356 s, 1.3 GB/s
>    $ /usr/bin/dd if=/dev/zero of=/dev/null bs=128k count=1000
>    1000+0 records in
>    1000+0 records out

This is the output that you get with gnudd and the status=noxfer option.
My patch was at first proposed in 2003 (and at this time the gnudd didn't
print any statistics), and I was willing to have all the information more
readable to me (directly).

> Now, as I understand it, you want a way to change the format of the
> standard-required lines to use si or human styles, and to count bytes.
> But why bother?  If all we want is to count bytes, all we need is the
> 3rd line, right?

Why shouldn't I have the number of bad read and bad writen blocks in 
bytes also ?

> How about the following counterproposal?  We let "status=+FORMAT"
> specify FORMAT as the format of the status line.  Users can then
> supply the format they like.  E.g., the current behavior could be
> implemented via something like this:
> 
> status=+'%I+%i records in
> %O+%o records out
> %b bytes (%Sb) copied, %T s, %Sr/s'
> 
> where 'S' is a modifier that says 'human-readable with SI units'.  The
> user can substitute whatever other format they like.  This should be
> easier to document and to explain than to have several flags
> controlling the format.

This is a terrific idea an I love it but which modifier would you use in 
case a user wants to use a 2356 bytes unit ? (users may have some strange
ideas sometimes)

I love your idea because I can then use the following format :
status=+'%SI+%Si records in
%SO+%So records out
%b bytes (%Sb) copied, %T s, %Sr/s'

And then I come to a feature that lacks in dd (and that may be implemented
using your idea) : print bad read or write block number. This will be 
useful when dumping an entire disk in order to do some file analysis.
Then we would have something like :
status=+'%nr' or status=+'%nw'
and dd would say :
1
7
8
13
...

Are you going to code such a patch ?

-- 
Olivier Delhomme : http://blog.delhomme.org/    [fr]

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]