We are looking to capture SMART drive information for out Mac TEM clients. I am able to get the info I need by using appendfile in a task to create a script that runs the diskutil command. Results are written to a text file. Then I can run an analysis that captures the data from the txt file.
I was hoping there might be a more direct route to grab the SMART info as well as the hard drive model.
I don’t have a whole lot of experience working with Mac so I thought I’d ask.
Yes, you have to do the two-step: a task that writes out the data and an analysis to read it in. We don’t currently have native inspectors to grab SMART status from drives.
Rather than appendfile, why not a simple “sh” Action with a one-liner like this:
diskutil info disk0 | grep SMART > /tmp/disk0_smart_status.txt
And then an analysis like:
(following text of first ":" of lines of file "/tmp/disk0_smart_status.txt") as trimmed string