I did some further digging, but as far as I can tell, these data, and their format, are not made public.
Reverse engineering the rvc Ruby sources for the VSAN part (in /opt/vmware/rvc/lib/rvc/modules/vsancmd), I found out they use the QueryVsanStatistics method.
But the labels you have to pass to this method are "The following labels are current supported: - TBD".
With a bit of guess work, and reading the comments in the Ruby source, I could determine that memory statistics are retrieved with the "mem" label.
That indeed returns information, but then the next roadblock is "The details of the counters remain undocumented and unsupported at this point, and this API remains internal."
At that point, I gave up.
I currently have the following, but no documented way to interpret what mem-group-stats and mem-heap-stats contain.
Nor do I know how to interpret the on-esx-collect-duration value
$clusterName = 'cluster'
$cluster = Get-View -ViewType ClusterComputeResource -Filter @{Name=$clusterName}
Get-View -ViewType HostSystem -SearchRoot $cluster.MoRef -PipelineVariable esx |
ForEach-Object -Process {
$vsanSys = Get-View -Id $esx.configManager.vsanInternalSystem
$memMetric = $vsanSys.QueryVsanStatistics(@('mem')) | ConvertFrom-Json
$memMetric.'mem-group-stats' | Out-File -FilePath ".\$($esx.Name)-vsan-mem-group-stats.csv"
$memMetric.'mem-heap-stats' | Out-File -FilePath ".\$($esx.Name)-vsan-mem-heap-stats.csv"
}