dd test displays error
tombowditch opened this issue · 4 comments
tombowditch commented
dd test is displaying error -
dd test
nench.sh: line 161: printf: 2.3e+09: invalid number
1st run: 0.00 MiB/s
nench.sh: line 164: printf: 2.4e+09: invalid number
2nd run: 0.00 MiB/s
nench.sh: line 167: printf: 2.6e+09: invalid number
3rd run: 0.00 MiB/s
nench.sh: line 171: printf: 2.43333e+09: invalid number
average: 0.00 MiB/s
I should mention this is on a ZFS based fs.
n-st commented
@madyoda Might be either your awk
version or locale settings.
Can you send post the output of awk --version
, awk 'BEGIN {print 2e12}'
, awk 'BEGIN {print int(2e12)}'
, and locale
, please?
Also, what OS is this on?
tombowditch commented
@n-st sure, thanks -
It's on Ubuntu 16.04:
~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
~# uname -a
Linux --- 4.8.0-53-generic #56~16.04.1-Ubuntu SMP Tue May 16 01:18:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
~# awk --version
awk: not an option: --version
# but this is my version:
~# awk -W version
mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan
compiled limits:
max NF 32767
sprintf buffer 2040
~# awk 'BEGIN {print 2e12}'
2e+12
~# awk 'BEGIN {print int(2e12)}'
2e+12
~# locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
n-st commented
Hmm, I didn't expect Ubuntu to ship with mawk
instead of gawk
…
I've pushed a workaround in 2e4a578, try again now.
tombowditch commented
@n-st can confirm it works - thank you very much!
dd: sequential write speed
1st run: 2288.82 MiB/s
2nd run: 2479.55 MiB/s
3rd run: 2384.19 MiB/s
average: 2384.19 MiB/s