Gathering virtual machine IOPS statistics by datastore

Version 4

    Our friendly storage admin sometimes calls me up or sends alert my way from the array when the virtual environment is generating too many IOPS on a particular parity group. From his side, this could be happening on any of a number of LUNs that have been presented to our hosts, and he has no way of telling me what virtual machines could be causing the trouble.



    Through the PowerCLI, I’ve scripted a way to check performance across the environment for the heavy hitters and report that info back. The script takes in an array of datastores, a vCenter Server FQDN, and a number of statistical samples to grab. It tracks down the physical hosts of the virtual machines that reside on those datastores and reports back the IOPS done (read & write) for each of those VMs over the interval specified.  The credentials it asks for are a local account on the ESX/ESXi hosts, NOT for vCenter.


    (Originally posted on my blog: