myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> Microsoft Systems Management Server >> SMS 2003 >> IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory Page: [1]
Login
Message << Older Topic   Newer Topic >>
IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory - 5/11/2007 12:36:40 PM   
msutliff

 

Posts: 104
Score: 0
Joined: 7/31/2003
Status: offline
Hard drives have had S.M.A.R.T. in them for years to help predict failure but I’ve never had a program or method to collect it’s events and report it to the helpdesk – before the disk completely fails (novel concept right?).  Today with help from Google I stumbled across this Sourceforge project..  http://sourceforge.net/projects/smartmontools/ S.M.A.R.T. Monitoring Tools and they have a Win32 version..
So I’m wondering if someone has already taken this code and exported the results to WMI (I guess using VBScript) so SMS can read it and report in hardware inventory – and possibly with the same VB Script, if there is an S.M.A.R.T. error then e-mail the helpdesk.  I suppose we would also need a silent install for this program..
Any ideas or code to share?
Post #: 1
RE: IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory - 9/24/2007 4:41:33 PM   
IloveMSproducts

 

Posts: 9
Score: 0
Joined: 8/15/2006
Status: offline
Hello fellow S.M.A.R.T. fans. 

I've created a cmd script I call via SMS which efectively runs "perl.exe HD_health_check.pl" and exit 0 to run the SMARTctl.exe program.  The Perl script runs the SMARTctl.exe program to execute a short SMART test plus monitors some variables.  Then it will write the results to a file on the C:\ directly.

Just download perl.exe and the DLL from Activestate Perl, and the SMARTctl.exe program from the http://sourceforge.net/projects/smartmontools/ address and drop the attached script into a folder. Run "perl.exe HD_health_check.pl" to start it.

09/24/2007  04:30 PM             9,105 HD_health_check.pl
04/13/2004  07:25 PM            20,540 perl.exe
04/13/2004  07:25 PM           667,710 perl56.dll
12/20/2006  05:08 PM           228,864 smartctl.exe

I end up using the File Inventory feature on SMS to see who's got a PASS/WARN/FAIL file on their PC, and a person can check their own PC by looking for C:\hard_disk_hda(warn/pass/fail).txt with all the gory details.

This started out as a proof of concept and I've been replacing HDs ever since.  PCs with a bunch of reallocated sectors are a good to replace, as are ones with FAILING_NOW listed in the Smart status!

Please let me know how this works for you.





Attachment (1)

(in reply to msutliff)
Post #: 2
RE: IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory - 9/28/2007 3:09:07 PM   
ejensen

 

Posts: 5
Score: 0
Joined: 12/6/2005
Status: offline
Very cool! Thank you for sharing this!!
Do you know if SMART has to be enabled in the BIOS?

(in reply to IloveMSproducts)
Post #: 3
RE: IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory - 9/28/2007 4:11:57 PM   
msutliff

 

Posts: 104
Score: 0
Joined: 7/31/2003
Status: offline
I guess manufacturers vary.. but I can't imagine that you have the option to enable or disable S.M.A.R.T.. it's built-into the hard drive.. It might be worth mentioning that HP's new 6910p laptops have a driver that monitors the drive and reports any failures to the user (I've not seen it happen yet).  The 6910p also has a 3-dimensional motion detector to park the heads and stop the platters if it feels sudden acceleration.. (I've not seen this as I'm to clumbsy to toss a $1500 notebook into the air and try to catch it).

(in reply to ejensen)
Post #: 4
RE: IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory - 10/4/2007 8:11:29 AM   
ejensen

 

Posts: 5
Score: 0
Joined: 12/6/2005
Status: offline
I have started using this against all our worstations and so far the results are fantastic! Thank you again!!

Have you done anything for server drives yet? We are a dell shop here and I was thinking about using the OpenManage software for something, but if you have other ideas please share them.

(in reply to msutliff)
Post #: 5
RE: IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory - 10/5/2007 2:31:37 PM   
IloveMSproducts

 

Posts: 9
Score: 0
Joined: 8/15/2006
Status: offline
I am glad someone else can use this!  I am curious: have you replaced any drives? If so, what errors did you see to replace them?

Personally I try to keep an eye on the laptops first, because once their drives report smart errors - they seem to go downhill in a hurry.  Desktops seem to last years with errors.

As far as servers, this script just does a smart test against "hda" which is the first HD in the PC.  In addition, if you have a hardware raid controller or SATA controller, it may block the S.M.A.R.T. signals.  I use this for instant SMART readouts: http://www.hdtune.com/.  If the HDtune health doesn't work, then the smartmontools program won't work.

You can click on the "Health" tab and it shows you the SMART readout of the drives it reads (dropdown box).

(in reply to ejensen)
Post #: 6
RE: IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory - 10/5/2007 3:31:27 PM   
ejensen

 

Posts: 5
Score: 0
Joined: 12/6/2005
Status: offline
Havent replaced any drives yet, but I have a list of computers to investigate... some with failing and some with warning. I am still trying to get a clear understanding of the output file.
When a warning file is produced, I am assuming it is because of the values exceeding thresholds.
For instance this line:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
3 Spin_Up_Time                       0x0027   225         225         063          Pre-fail    Always       -       9002

Off that line I am assuming that Spin_Up_Time is being read from the drive, the value it recieved is 225 and the Threshold is 063. So the utility is predicting a problem here.

Am I reading into that correctly? Any documentation you recomend that will help?

thanks again for contributing this to the community!

(in reply to IloveMSproducts)
Post #: 7
RE: IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory - 10/12/2007 2:44:14 PM   
IloveMSproducts

 

Posts: 9
Score: 0
Joined: 8/15/2006
Status: offline
Check out http://en.wikipedia.org/wiki/S.M.A.R.T.
Look for the Columns in "red" they are the values you need to watch for first.

That Spin-Up looks higer than normal-Compare it to a known-good drive.  Any value at the end is normal though.  If you had something instead of a  "-" in the WHEN_FAILED column you would know something is wrong.

Example of new disk 535 hours:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate     0x000b   100   100   062    Pre-fail  Always       -       0
2 Throughput_Performance  0x0005   100   100   040    Pre-fail  Offline      -       0
3 Spin_Up_Time            0x0007   154   154   033    Pre-fail  Always       -       1
4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       100
5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
8 Seek_Time_Performance   0x0005   100   100   040    Pre-fail  Offline      -       0
9 Power_On_Hours          0x0012   099   099   000    Old_age   Always       -       535
10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       79
191 G-Sense_Error_Rate      0x000a   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       47448073
193 Load_Cycle_Count        0x0012   100   100   000    Old_age   Always       -       1883
194 Temperature_Celsius     0x0002   157   157   000    Old_age   Always       -       35 (Lifetime Min/Max 18/42)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0
223 Load_Retry_Count        0x000a   100   100   000    Old_age   Always       -       0

Example of worn out disk 20,000 hours:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate     0x000f   100   100   046    Pre-fail  Always       -       66953
2 Throughput_Performance  0x0005   100   100   030    Pre-fail  Offline      -       15728640
3 Spin_Up_Time            0x0003   100   100   025    Pre-fail  Always       -       0
4 Start_Stop_Count        0x0032   099   099   000    Old_age   Always       -       261
5 Reallocated_Sector_Ct   0x0033   100   100   024    Pre-fail  Always       -       8589934592000
7 Seek_Error_Rate         0x000f   100   100   047    Pre-fail  Always       -       3804
8 Seek_Time_Performance   0x0005   100   100   019    Pre-fail  Offline      -       0
9 Power_On_Seconds        0x0032   060   060   000    Old_age   Always       -       20204h+19m+03s
10 Spin_Retry_Count        0x0013   100   100   020    Pre-fail  Always       -       0
12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       146
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       6
193 Load_Cycle_Count        0x0032   071   071   000    Old_age   Always       -       296087
194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       48 (Lifetime Min/Max 14/59)
195 Hardware_ECC_Recovered  0x001a   100   100   000    Old_age   Always       -       2889
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       286982144
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x000f   100   100   060    Pre-fail  Always       -       105
203 Run_Out_Cancel          0x0002   100   100   000    Old_age   Always       -       433767120570

See how many items have value >0 in the worn out disk?  This disk is slow as cold syrup.

Here is an example of a FAIL_NOW:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct   0x0032   083   083   112    Old_age   Always   FAILING_NOW 468



(in reply to ejensen)
Post #: 8
RE: IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory - 10/15/2007 10:58:09 AM   
jstuder

 

Posts: 28
Score: 0
Joined: 11/5/2004
Status: offline
WOW!  This is great!!
It works great on most of our machines, but when I run it on our newer machines that have SATA drives I get:

C:\smart>smartctl.exe HD_health_check.pl
smartctl version 5.37 [i686-mingw32-vista] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
Smartctl: please specify device type with the -d option.
Use smartctl -h to get a usage summary

Any Suggestions?

Thanks, -Jon

(in reply to IloveMSproducts)
Post #: 9
RE: IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory - 10/15/2007 4:39:49 PM   
IloveMSproducts

 

Posts: 9
Score: 0
Joined: 8/15/2006
Status: offline
http://smartmontools.sourceforge.net/#testinghelp has info on SATA drive monitoring.  I'll have to check some of my SATA drives and see if the "-d sat"  option works as decribed, and if so, how I can work that into the script so it works like IDE drives.  Thanks for the heads up!

(in reply to jstuder)
Post #: 10
RE: IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory - 10/15/2007 4:43:11 PM   
IloveMSproducts

 

Posts: 9
Score: 0
Joined: 8/15/2006
Status: offline
Whoops, I didn't read your post correctly, you need to run "perl.exe HD_health_check.pl".  You may need to download perl.exe and the DLL from my original post and stick it in the directory.

the Smartctl.exe file does the monitoring, so read their documentation for how it works.  My perl script is just a hack to spit out a filename with readable information.

(in reply to jstuder)
Post #: 11
RE: IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory - 10/15/2007 6:32:42 PM   
jstuder

 

Posts: 28
Score: 0
Joined: 11/5/2004
Status: offline
Thanks for the correction. you were right.
I mixed up the syntax when i switched to trying it on my other machine.

We're really excited about using this!

Do you have suggestions for deploying this?

Thanks again,
-Jon

(in reply to IloveMSproducts)
Post #: 12
RE: IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory - 10/29/2007 3:12:29 PM   
IloveMSproducts

 

Posts: 9
Score: 0
Joined: 8/15/2006
Status: offline
I run this weekly on ~1000 PCs and then I do a SMS file inventory for the "hard_disk_hda%" text file.  Then I'll check out the warn/failed text files on the remote PC manually to determine the severity of replacing the disk.

(in reply to jstuder)
Post #: 13
Page:   [1]
All Forums >> [Management Products] >> Microsoft Systems Management Server >> SMS 2003 >> IDE-SCSI S.M.A.R.T Data to WMI to SMS Inventory Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.359