VMware Cloud Community
M3VM
Enthusiast
Enthusiast

how to get free space(memory) value of esx host

Hi,

I want to get free space(memory) value of esxi host. From vsphere client, I could see that freeSpace = Capacity - MemoryUsage. Found an esxcli command for finding capacity: "esxcli hardware memory get". Capacity is given as Physical Memory in the output of the above command.

But could not find any esxcli command  for finding MemoryUsage? Thanks

4 Replies
Paltelkalpesh
Enthusiast
Enthusiast

Using esxtop, you can monitor all four major resource types (CPU, disk, memory, and network) on a particular ESXI host.

M3VM
Enthusiast
Enthusiast

Is there any other command apart from esxtop?

Reply
0 Kudos
thibaudpeter
Enthusiast
Enthusiast

#vdf -h

-----

Ramdisk                   Size      Used Available Use% Mounted on

root                       32M      248K       31M   0% --

etc                        28M      368K       27M   1% --

opt                        32M        0B       32M   0% --

var                        48M     1016K       47M   2% --

tmp                       256M       12M      243M   5% --

iofilters                  32M        0B       32M   0% --

hostdstats                114M        2M      111M   1% --

Reply
0 Kudos
xsamalix
Contributor
Contributor

Get-VMHost -Name MyEsx | Select Name  @{N='Memory Capacity GB';E={[math]::Round($_.MemoryTotalGB,2)}},     @{N='Memory Used GB';E={[math]::Round($_.MemoryUsageGB,2)}},     @{N='Memory Free GB';E={[math]::Round(($_.MemoryTotalGB - $_.MemoryUsageGB),2)}}

From ESXCLI Command you can just get the total memory for your reference you can go through: vSphere Documentation Center

Thank you.

Regards,

Ali

Reply
0 Kudos