I was just checking out some of the VMworld Sessions and one that I really enjoyed was the one on “Memory Virtualization” session by Kit Colbert and YP Chien (#VSP2447). This session has a lot of nuggets but something I wanted to share is this script that YP Chien / Kingston showed up on stage. This script basically shows you at what speed your memory is capable of runing at. I asked Alan Renouf if he could test it as my lab is undergoing heavy construction. He tested it and mailed me back the output of the following script:
$cred = Get-Credential
$sessOpt = New-WSManSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck
$rsrcURI = "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2//CIM_PhysicalMemory"
foreach ($h in (Get-VMHost)) {
Write-Output $h.Name
Get-WSManInstance -ConnectionURI ("https`://" + $h.Name + "/wsman") -Authentication basic -Credential $cred -Enumerate -Port 443 -UseSSL -SessionOption $sessOpt -ResourceURI $rsrcURI | Select ElementName, @{N="Capacity (GB)";E={$_.Capacity / 1073741824.}}, MaxMemorySpeed
}
The output will look like this:
hostname01.local
ElementName : DIMM1
Capacity (GB) : 2
MaxMemorySpeed : 800
hostname02.local
ElementName : DIMM1
Capacity (GB) : 2
MaxMemorySpeed : 800
For those wondering what more you can get from CIM I would suggest reading this great article on the VMware PowerCLI blog.
Rick Schlander says
Duncan,
Great nugget indeed! Especially to validate memory speed on your server.
Rick
@vmrick
tr says
Thank you for the script. I have been needing to find out the populated memory banks and this worked for me
Kevin Houston says
Great info. Looks like the link has changed, though. As of 3/12/2012 the link is at:
http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PhysicalMemory.xsd