Weird output for free -h --si
snellius paulm@gcn36 14:27 ~$ free -b
total used free shared buff/cache available
Mem: 540656082944 9616064512 530403569664 99012608 636448768 526482608128
Swap: 0 0 0
So 540,656,082,944 bytes, i.e. 540.66 GB or 503.53 GiB, correctly reported with the respective flags (except for rounding down instead of up):
snellius paulm@gcn36 14:30 ~$ free --giga
total used free shared buff/cache available
Mem: 540 9 530 0 0 526
Swap: 0 0 0
snellius paulm@gcn36 14:30 ~$ free --gibi
total used free shared buff/cache available
Mem: 503 8 493 0 0 490
Swap: 0 0 0
Using the -h
flag then shows the correct number in GiB, but a really weird number when using -h --si
that I can't figure out, nor is it close to the actual value in GB:
snellius paulm@gcn36 14:30 ~$ free -h
total used free shared buff/cache available
Mem: 503Gi 9.0Gi 493Gi 94Mi 606Mi 490Gi
Swap: 0B 0B 0B
snellius paulm@gcn36 14:30 ~$ free -h --si
total used free shared buff/cache available
Mem: 515G 9.2G 505G 94M 606M 502G
Swap: 0B 0B 0B
Example above is with procps-ng 3.3.15, but seeing similar effects with 3.3.17
Edited by Paul Melis