Hi Im trying to retrieve cache stats though powerCLI using Get-EsxCli, but its not returning all values.
Is this a known problem ?
PowerCLI version VMware-PowerCLI-6.5.0-4624819. ( 6.5.0.234 )
OS Windows 10
vCenter 6.5.0 Build 4602587
VMware ESXi 6.5.0 4564106
PowerCLI C:\> Connect-VIServer vCenter
Name Port User
---- ---- ----
vCenter 443 sonny
PowerCLI C:\> $esxcli = Get-EsxCli -VMhost esx012 -V2
PowerCLI C:\> $esxcli.storage.vflash.cache.list.Invoke()
Name
----
vfc-2609293434-ly-cg-20_2
PowerCLI C:\> $esxcli.storage.vflash.cache.stats.get.Invoke(@{cachename = 'vfc-2609293434-ly-cg-20_2'; modulename = 'vfc'})
Cacheusagerateasapercentage : 99
Evict : {VMware.VimAutomation.ViCore.Impl.V1.EsxCli.EsxCliObjectImpl}
Meannumberofcacheblocksinuse : 214111
Read : {VMware.VimAutomation.ViCore.Impl.V1.EsxCli.EsxCliObjectImpl}
TotalfailedSSDIOs : 0
TotalfaileddiskIOs : 0
PowerCLI C:\>
Did you expand the nested objects?
Try something like this (you might want to lower/increase the Depth value)
$esxcli.storage.vflash.cache.stats.get.Invoke(@{cachename = 'vfc-2609293434-ly-cg-20_2'; modulename = 'vfc'}) |
Format-Custom -Depth 3
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Do you get the missing data when you do this with the esxcli command in a SSH session to the ESXi node?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, SSH esxcli works perfect.
[root@esx012:~] esxcli storage vflash cache stats get -c vfc-2609293434-ly-cg-20_2
Read:
Cache hit rate (as a percentage): 1
Total cache I/Os: 34
Mean cache I/O latency (in microseconds): 720
Mean disk I/O latency (in microseconds): 7618
Total I/Os: 47946
Mean IOPS: 257
Max observed IOPS: 261
Mean number of KB per I/O: 59
Max observed number of KB per I/O: 69
Mean I/O latency (in microseconds): 3880
Max observed I/O latency (in microseconds): 9927
Evict:
Last I/O operation time (in microseconds): 0
Number of I/O blocks in last operation: 0
Mean blocks per I/O operation: 0
Cache usage rate (as a percentage): 99
Total failed SSD I/Os: 0
Total failed disk I/Os: 0
Mean number of cache blocks in use: 214111
[root@esx012:~]
Did you expand the nested objects?
Try something like this (you might want to lower/increase the Depth value)
$esxcli.storage.vflash.cache.stats.get.Invoke(@{cachename = 'vfc-2609293434-ly-cg-20_2'; modulename = 'vfc'}) |
Format-Custom -Depth 3
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That did the job. Thanks for the help.
PowerCLI C:\> $esxcli.storage.vflash.cache.stats.get.Invoke(@{cachename = 'vfc-2609293434-ly-cg-20_2'; modulename = 'vfc'}) | Format-Custom -Depth 2
class EsxCliObjectImpl
{
Cacheusagerateasapercentage = 99
Evict =
[
class EsxCliObjectImpl
{
LastIOoperationtimeinmicroseconds = 0
MeanblocksperIOoperation = 0
NumberofIOblocksinlastoperation = 0
}
]
Meannumberofcacheblocksinuse = 214111
Read =
[
class EsxCliObjectImpl
{
Cachehitrateasapercentage = 1
MaxobservedIOlatencyinmicroseconds = 9927
MaxobservedIOPS = 261
MaxobservednumberofKBperIO = 69
MeanIOlatencyinmicroseconds = 3880
MeanIOPS = 257
MeancacheIOlatencyinmicroseconds = 720
MeandiskIOlatencyinmicroseconds = 7618
MeannumberofKBperIO = 58
TotalIOs = 47946
TotalcacheIOs = 34
TotaldiskIOs = 47912
}
]
TotalfailedSSDIOs = 0
TotalfaileddiskIOs = 0
}