Capture S.M.A.R.T (SMART) Information

(imported topic written by SystemAdmin)

Can BigFix capture SMART status for locally connected hard drives? And

how about capturing the model and serial number of hard drives

directly attached to the system?

I’m wondering if we can monitor this data centrally and then

proactively replace failing hard drives.

(imported comment written by Lee Wei)

Windows WMI has the classes to extract these information.

Here are some examples.

Hard Disk Drive - Primary - Model

string values of selects “Model from win32_diskdrive where deviceid = ‘\\.\PHYSICALDRIVE0’” of wmi

Hard Disk Drive - Primary - Serial Number

(string values of (selects “SerialNumber from win32_physicalmedia where tag = ‘\\.\PHYSICALDRIVE0’” of wmi)) as trimmed string

Hard Disk Drive - Secondary - Model

if (exists wmi) and (exists selects “Size from win32_diskdrive where deviceid = ‘\\.\PHYSICALDRIVE1’” of wmi) then string values of selects “Model from win32_diskdrive where deviceid = ‘\\.\PHYSICALDRIVE1’” of wmi else “none”

Hard Disk Drive - Secondary - Serial Number

if (exists wmi) and (exists selects “Size from win32_diskdrive where deviceid = ‘\\.\PHYSICALDRIVE1’” of wmi) then (string values of (selects “SerialNumber from win32_physicalmedia where tag = ‘\\.\PHYSICALDRIVE1’” of wmi)) as trimmed string else “none”

SMART Status from

http://msdn.microsoft.com/en-us/windows/hardware/gg463395

(string value of property “PredictFailure” of it & " - " & string value of property “InstanceName” of it) of select objects “* from MSStorageDriver_FailurePredictStatus” of wmi “root\WMI”

Lee Wei

(imported comment written by SystemAdmin)

Thank you, Lee. This is a great start!

(imported comment written by SystemAdmin)

I’m using this relevance below and sometimes getting an error back. I see some errors:

Singlular expression refers to nonexistant object - I see this on VM clients

The expression could not be evaluated: Windows Error: unknown error 0x8004100c

The expression could not be evaluated: Windows Error: 8004100c not supported

I only care about the health of the primary drive and every system in the site where i have this analysis only has 1 drive. How can I make the property show something other than error if the drive does not support SMART?

(string value of property “PredictFailure” of it) of select objects “* from MSStorageDriver_FailurePredictStatus” of wmi “root\WMI”

(imported comment written by SystemAdmin)

This will show you Not Supported in the case of an error executing the WMI statement:

if ( exists select object "PredictFailure from MSStorageDriver_FailurePredictStatus" of wmi "root\WMI" | false ) then ( ( it as string ) of select objects "PredictFailure from MSStorageDriver_FailurePredictStatus" of wmi "root\WMI" ) else ( "Not Supported" )

(imported comment written by SystemAdmin)

As calling any wmi inspector can be very system dependent on how it works you could also have a problem with the OS. For example: http://support.microsoft.com/kb/836802

(imported comment written by SystemAdmin)

http://bigfix.me/cdb/analysis/47