Re: free reports in 68

Albert Cahalan (albert@ccs.neu.edu)
Sat, 24 Feb 1996 18:43:09 -0500 (EST)


> Well.. looks like the procps stuff is going funny again. Yes, I am
> running procps-0.99. 1.3.68 supports more fields for free. This results
> in some very strange behavior. When issueing free with no flags, it is
> very rough, and part of it is displayed in MB like so:
>
> total used free shared buffers
> Mem: 15076 14624 452 3448 5280
> -/+ buffers: 9344 5732
> Swap: 18140 1916 16224
> MemTotal: 14
> MemFree: 0
> MemShared: 3
> Buffers: 5
> Cached: 6
> SwapTotal: 17
> SwapFree: 15
>
> Unfortunately, this causes problems with the program that thinks the
> whole report is in KB. Notice what happens when you issue free -m
> (display in MB):
>
> total used free shared buffers
> Mem: 14 13 1 4 3
> -/+ buffers: 9 5
> Swap: 17 1 15
> MemTotal: 0
> MemFree: 0
> MemShared: 0
> Buffers: 0
> Cached: 0
> SwapTotal: 0
> SwapFree: 0
>
> I'm also wondering why we have thse new fields since it's obviously the
> same information that is above. Is this just a bug in the code? I
> patched up from 66, but the same thing happens to my friend who got the
> source.

Since it just got broken again anyway, might as well update it.
Why kB or MB? It should be _pages_, because that is what the kernel knows.

Another thing about /proc stuff: 0-padded hex is really fast and still
somewhat readable.