Package: pv
Version: 1.1.4-1.1.201004211350
Severity: minor

If I pipe a file >1GiB tough pv, the display gets garbled around the
1GiB barrier, because for a slight moment the with needed to display the
transfered size needs one character more than normally, so all
characters afterward get shifted to the right.
As the transfer continues, the value is displayed again with one less
character and all characters shift one character to the left again,
leaving one stray digit at the end of the line. This looks ugly since
the seconds seem to consist of 3 digits.

The following command demonstrates the problem and captures the output
in a log file including all escape sequences:

(dd if=/dev/zero bs=1M count=999 ; sleep 1 ; dd if=/dev/zero bs=1M
count=1 ; sleep 1 ; dd if=/dev/zero bs=1M count=500 ; sleep 1)
2>/dev/null | pv -btef -s $((1500*1<<20)) >/dev/null 2>./log

Replacing ^M by newlies in ./log shows the following sequence:
 980MB 0:00:01  ETA 0:00:00
 999MB 0:00:02  ETA 0:00:01
0,977GB 0:00:03  ETA 0:00:01
1,46GB 0:00:04  ETA 0:00:00
1,46GB 0:00:04
On sceen, the final line looks like this:
1,46GB 0:00:04             1

Looks like a 1000 vs 1024 mixup in src/pv/display.c.

-- System Information:
Debian Release: 5.0.1
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.30-ucs25-amd64
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages pv depends on:
ii  libc6             2.7-18.26.201002221044 GNU C Library: Shared libraries

pv recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to