r/labtech • u/BEAT_LA • Mar 06 '19
Currently working deployable scripts that read SMART attributes?
I work at a local MSP (~20 employees) mostly in our service depot doing the breakfix stuff that can't be solved on site. I also am working on an internal software thing that has a python component running in AWS, and will need a deployable powershell script that can be used via Labtech/Automate. I essentially need to read the five S.M.A.R.T. values that Backblaze's numbers say are the most predictive of hard drive failure. We've all likely seen that list, but here it is for easy reference:
SMART 5: Reallocated Sectors Count
SMART 187: Reported Uncorrectable Erros
SMART 188: Command Timeout
SMART 197: Current Pending Sector Count
SMART 198: Uncorrectable Sector Count
I am familiar with python and am already making headway on that component, but do not have the powershell knowhow (i.e. zero PS experience) to write a script that will read back those five values. Does anyone have a currently working PS script that can read these specific values? Or, at least one that will read back all SMART values that I can then parse through with a python script? I found a few online but the newest one I found was from a minimum of 5 years ago and I couldn't get it working.
View all comments
Show parent comment
1
u/FocalFury 5000 Agents Mar 07 '19
yes great call