A couple days ago I was involved in troubleshooting a linux server that was only reporting 4 GB of memory rather then the 8 GB it was supposed to have.

Since my team only technically supports the hardware of systems running Linux, the only way I have besides referring to documentation is to reboot the box and see what is reported during POST – in this case it was a production server, and was functioning. So no reboot.

Hmmm what to do? I spoke with one of the Unix/Linux administrators and got him to establish a console session on the physical console that I could drive over the IP-KVM.

I confirmed that only 4 GB of ram was inplace by looking at top. To confirm that something didn’t happen to the server between boot and now, I executed more /var/log/messages* | grep Memory. The output confirmed that only 4 GB of RAM was detected on the server:

Oct 12 09:49:29 localhost kernel: Memory: 3942888k/4194304k available (1675k kernel code, 74732k reserved, 1278k data, 228k init, 3104728k highmem)

There were several matches for this showing that the system had not successfully detected all 8 GB of memory for some time. Next thing to check was the kernel compilation options, to check if PAE was enabled – cat /boot/config-2.4.21-57.ELsmp | grep CONFIG_HIGHMEM (I checked uname -a, and grub.conf to find out what kernel was booted).

The results was that CONFIG_HIGHMEM4GB=y was set, effectively limiting the system to 4 GB of RAM, when in reality CONFIG_HIGHMEM64GB=y which would have fully enabled PAE for a 32 bit system.