Howdy,

I was just trying to figure out how much RAM one of our servers has and I keep getting 
weird answers. I thought it had either 256 or 512, really, I thought 256. But look at 
the following:

[admin@csc003 admin]$ free -m
             total       used       free     shared    buffers     cached
Mem:           505        445         59        212        287         80
-/+ buffers/cache:         77        427
Swap:          258          2        256

I thought 505 MB couldn't be right so I tried top:

Mem:   517120K av,  458456K used,   58664K free,  219068K shrd,  294848K buff

Weird. So I started poking around in /proc:

[admin@csc003 admin]$ cat /proc/meminfo 
        total:    used:    free:  shared: buffers:  cached:
Mem:  529530880 469475328 60055552 224567296 301924352 84647936
Swap: 271392768  2220032 269172736
MemTotal:    517120 kB
MemFree:      58648 kB
MemShared:   219304 kB
Buffers:     294848 kB
Cached:       82664 kB
BigTotal:         0 kB
BigFree:          0 kB
SwapTotal:   265032 kB
SwapFree:    262864 kB

The math for that comes out weird no matter what I do:

[jw@garnet jw]$ python
Python 1.5.2 (#1, Feb  1 2000, 16:32:16)  [GCC egcs-2.91.66 19990314/Linux (egcs- on 
linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> 529530880 / 1024 
517120
>>> 529530880 / 1024 / 1024
505
>>> 529530880 / 1000 / 1000
529
>>> 529530880 / 1024 / 1000
517
>>>  

Next I tried a cgi-bin script:

Main Memory     : 511 megabytes

It seems to get it's info from the size of /proc/kcore

Can anyone explain why this isn't working out to exactly 512 MB? After all this is a 
computer - is should be precise right down to the byte.

----------------------------------------------------
Jonathan Wilson
System Administrator

Cedar Creek Software
http://www.cedarcreeksoftware.com

Central Texas IT
http://www.centraltexasit.com



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to