We have too many hosts to check manually so I turned to Google and also fired up PowerCLI and was able to whip up the following.
Previously, I wrote a script using Powershell and PowerCLI to validate using the PowerPath management rmpowermt command (we use EMC PowerPath on our blades) but the output I was getting in the newer release of PowerPath (5.8) wasn't reporting correctly. So I needed to perform some soul searching aka googling.
The following can report on path states, and is easily adjustable as you can use various variables, filters, and sort features to tune it for your needs. The example of the script I used is below:
$VMHosts = Get -VMHost | ? { $_.ConnectionState -eq "Connected" } | Sort-Object -Property Name $results = @() foreach ( $VMHost in $VMHosts ) { Get -VMHostStorage -RescanAllHba -VMHost $VMHost | Out-Null [ARRAY] $HBAs = $VMHost | Get -VMHostHba -Type "FibreChannel" foreach ( $HBA in $HBAs ) { $pathState = $HBA | Get -ScsiLun | Get -ScsiLunPath | Group-Object -Property state $pathStateActive = $pathState | ? { $_.Name -eq "Active" } $pathStateDead = $pathState | ? { $_.Name -eq "Dead" } $pathStateStandby = $pathState | ? { $_.Name -eq "Standby" } $results += "{0},{1},{2},{3},{4},{5}" -f $VMHost .Name, $HBA .Device, $VMHost .Parent, [INT] $pathStateActive .Count, [INT] $pathStateDead .Count, [INT] $pathStateStandby .Count } } ConvertFrom -Csv -Header "VMHost" , "HBA" , "Cluster" , "Active" , "Dead" , "Standby" -InputObject $results | Ft -AutoSize |