get total host memory on VMWare ESXi

It is my opinion that Graphical User Interfaces (GUIs) can make administration both easier, and more difficult. I highly prefer commandline, and many appliances and non desktop systems have a plethora of advanced options when configuring from the command line. I always void the warranty and get under the hood. All of my ESXi servers have SSH and Console enabled. If you have someone in the datacenter replacing suspect memory on an ESXi system, you don’t want to have them re-rack it and cable it up, just so you can log in through vSphere, just to see if the host sees all the memory. Just do it from commandline. Oh yeah, and free is not a recognized command on the ESXi shell.

# free
-ash: free: not found
#
# vim-cmd hostsvc/hosthardware | grep memorySize | sed -e 's/,//' -e 's/^ *//' 
memorySize = 34182787072
#

This was done on ESXi 4.1.0 Build 345043

share:

Leave a Reply

Your email address will not be published. Required fields are marked *