You are not logged in.

#1 2018-08-14 12:12:41

N_BaH
Member
Registered: 2015-12-30
Posts: 84

[solved] man free I don't understand

hi,

$ free -h
$ LC_ALL=C free -h                                                                                                                                                                                                                  
              total        used        free      shared  buff/cache   available                                                                                                                                                                                          
Mem:          2.9Gi       589Mi       1.8Gi        69Mi       500Mi       2.4Gi                                                                                                                                                                                          
Swap:         4.0Gi          0B       4.0Gi

from the [man page] I can read

Following units are used.

                B = bytes
                K = kibibyte
                M = mebibyte
                G = gibibyte
...

doesn't it mean that digits should be followed by B, or K.. not Bi, or Ki, does it ?

Last edited by N_BaH (2018-08-14 15:56:28)

Offline

#2 2018-08-14 12:55:25

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [solved] man free I don't understand

It does appear free uses Ki = kibibyte ,  Mi = mebibyte ,  Gi = gibibyte,  K = kilobyte,  M = megabyte,  G = gigabyte

Offline

#3 2018-08-14 12:59:59

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [solved] man free I don't understand

Haha I see what you mean. tongue

I guess it's a bug in the man page? You could report it here: https://gitlab.com/procps-ng/procps/iss … ate=opened

To get the output you were expecting, use: "free -h --si"

Offline

#4 2018-08-14 15:56:07

N_BaH
Member
Registered: 2015-12-30
Posts: 84

Re: [solved] man free I don't understand

I'm going to report.

thank you.

--
posted here

Last edited by N_BaH (2018-08-17 18:11:47)

Offline

#5 2018-08-14 23:55:37

ceratophyllum
Member
From: Red Dwarf
Registered: 2018-08-14
Posts: 12

Re: [solved] man free I don't understand

Maybe they want to distinguish between real SI prefixes  Kilo (K), Mega(M), Giga(G), which are 1000, 1 000 000, 1 000 000 000 and, err, computerese prefixes where eveyrthing must be a power of 2: "Ki" is 1024, "Mi" is  1 048 576, and "Gi" is  1 073 741 824 ?

I notice the numbers aren't the same when you specify --si; e.g. 7.7G is 7.5 "Gi" on my system.

Last edited by ceratophyllum (2018-08-14 23:59:01)


After qoud, nisi, num, and ne
All the alis drop away....

Offline

Board footer

Powered by FluxBB