Re: Exact RAM size.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rohit khaladkar wrote:
Hi!I have Red Hat linux 4.5 and 5.2 installed on my systems. There is a
application which tells me, how much exact RAM size is required to load
another application.For eg : it would be 20 GB or 2 GB.
Now when I run my script I need to find out the RAM size.But if the server
ordered is of 2GB RAM size , exactly 2GB is never shown by the system. It is
a little less than 2GB.Is there any way I can have a criteria
to tell how much is the exact RAM size.

Thanks!
Rohit Khaladkar
Well, what the operating system tells you counts.

For example, if you have 4 GiB installed (as given by the DIMM sizes), then the OS
will announce less:

-- because the hardware will not see part of the RAM as it will be hidden by memory-mapped devices
-- because the kernel reserves a part for the crash handler
-- because of the kernel image

So you just do "cat /proc/meminfo" (or alternatively 'free', which reads /proc/meminfo) and read off "MemTotal".
This is all the free memory you get.

Kernel data structures, I/O caches and the User processes will all have to go in there.










--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux