Total system physical memory information in linux
Hi,
I am writing a test code where by I need to check the actual physical memory on the linux system. But I am not able to find the command for that. The linux commands like free, or /proc/meminfo or dmesg | grep Memory only show the physical memory available to linux but not the ACTUAL RAM available on system. For example, my system has 2GB of RAM and I provide only 512 MB to linux (using mem=512MB command in the grub file). So when I use any of the above commands to see the physical memory they show me 512 MB and not 2GB! Reading mtrr contents looks like a good option but I am not very sure if it will give correct data on all the systems. Can someone help me? |
by specifying mem=512MB in grub, your telling grub that "there is no need for you(grub) too find out the total memory, I tell you the memory is 512MB."
So, after that it doesnt bother to search for the total memory. I dont think you will be able to find the total physical ram. why would want to restrict the mem to 512MB anyway? |
Quote:
|
All times are GMT -5. The time now is 06:57 PM. |