VMware Cloud Community
kwvalenti
Contributor
Contributor
Jump to solution

get-scsilun call performance

I'm trying to determine how many devices are attached to each host in my environment.  When I call (get-scsilun -vmhost XXX).count on a 4.1 host, it takes around 4 seconds to complete.  When I make the same call against a 5.1 host, it takes around 74 seconds.  What can I do to improve my 5.1 host calls?

Thanks!

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Yes, the Get-ScsiLun cmdlet tends to be a bit slow.

An alternative is to use the Get-EsxCli cmdlet.

Something like this

$esxcli = Get-EsxCli -VMHost MyEsx 
$esxcli
.storage.core.device.list() | Measure-Object | Select -expandproperty count

That should give the same result, but a lot faster


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership
Jump to solution

Yes, the Get-ScsiLun cmdlet tends to be a bit slow.

An alternative is to use the Get-EsxCli cmdlet.

Something like this

$esxcli = Get-EsxCli -VMHost MyEsx 
$esxcli
.storage.core.device.list() | Measure-Object | Select -expandproperty count

That should give the same result, but a lot faster


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos