I'm trying to write a PowerShell script which will show me the LUN statistics for "Partner Ops" which is very helpful in finding VMware Data stores that are not going through the optimal path. I am looking for a direct PowerShell replacement for "lun stats -o" but don't want to use the cmdlet "Invoke-NaSsh" as we only use domain based usernames.
I think what you are looking for is the scsi_partner_ops counter for the lun object. The instance name for LUNs is in the form <lun-path>-<lun-serial-number>. You can construct this yourself, or use "Get-NaPerfInstance lun" to see a listing of LUN instances. In order to get an accurate reading, you'll need to collect the counter data, wait a few seconds, collect the counter data again, then calculate the delta. For example:
3) In this context, a LUN instance is an instance of the lun perf object. Typically, there is one lun perf object instance per LUN on the system. Get-NaPerfObject lists all of the available perf objects. Get-NaPerfInstance lists all the available instances of a given perf object. Get-NaPerfCounter lists all of the available counters of a given perf object. And finally, Get-NaPerfData gets counter values for a given instance of a given perf object.
4) I'm not sure on this one. You can look through the counters for the volume perf object, but I didn't see anything that stood out to me.