ProLiant Servers (ML,DL,SL)
Showing results for 
Search instead for 
Did you mean: 

Find disk drive size with WMI

Go to solution

Find disk drive size with WMI

I am trying to gather some specific information about the drives in my array using WBEM / WMI. In particular, I need to know the manufacturer, type (SSD/spindle), speed, and size of each physical drive in the server. I am using HP's Insight Management WBEM Providers to find this information with WMI.

So far I have found the speed in the DriveRotationalSpeed property of HPSA_DiskDrive. SSD vs. Spindle is more or less in the Description property of the same class. Manufacturer is in the Manufacturer property of HPSA_DiskDriveFirmware.

However, nowhere can I find the size of the drive. This seems unbelievable to me, but I have searched through the property name and value of every class in the "root/hpq" namespace and can't find anything. Surely I'm missing something - where can I find this information?


Re: Find disk drive size with WMI

I found a solution to this problem elsewhere. Although the size doesn't appear anywhere, you can calculate it.

Find a given drive in HPSA_StorageExtent. BlockSize * NumberOfBlocks / 1000000000 = the capacity in GB.