Using Scripts to monitor SSD wear

Avatar Rick Churchill
I was interested to find on the Eclectic Light Company “Monitoring SSD wear and ageing” so I downloaded and installed Smartmontools 7.2-1. dmg from Sourceforge as recommended.

Double clicking on the dmg icon I get a readme file and a .pkg file. Double clicking produces a warning so a trip to System preferences > Security and Privacy to click Open anyway. I go through the installation process and it says Installed Successfully. Do I want to move the installer to the bin and I click yes.
I cannot find Smartmontools in the Applications folder however.

Next EL Co asks me to download a script which when the folder is opened contains 3 files: HowsmySSD.app, HowsmySSD.scptd and a Read me file which says the first time I run it, it will again ask for the same reassurance from Security and Privacy.

Unfortunately the file blinks when I click it then nothing.

Is this the way scripts should be run by clicking the .app file?

Re: Using Scripts to monitor SSD wear

Avatar Tony Still
The Eclectic Light article is from 2016 and a lot has changed since then; I don't see the app on EL's support pages either (not a good sign). It looks like AppleScript so it may still work, in which case there may be a simple disconnect with Smartmontools. You might also get a silent failure if you're not using an Admin account (wild guess).

The Smartmontools download is more recent (though it claims to be for OS X which is not a name we've used for a while). The install is not an app, just a binary utility (that the article suggests will be in /usr/local/sbin so you could look for it there). That's presumably why Eclectic Light then provided a GUI front-end. Trying the command line offered (in Terminal) may give a useful message.

Other sources suggest that Smartmontools requires HomeBrew (a package installer). You could try here and here but do be careful to use safe sources (I expect you'll need to hand out all manner of privileges); I would also have been concerned that something so close to the hardware might have been vetoed by Big Sur but they claim it works OK.

I've never used HomeBrew so would welcome a presentation on it once our meetings resume.

Re: Using Scripts to monitor SSD wear

Avatar Rick Churchill
Thanks Tony.
When I put usr in the search box for my disc
I find only one location at
Macintosh HD/Users/Shared/Previously Relocated Items/Security/usr/libexec/firmware checkers/eficheck/EFI AllowListAll.bundle

However if I ignore the search results and search manually I have found

System/iOSSupport/usr/lib/swift/ which is empty.

I am unable to find /usr/local/sbin

Sbin in search is not found.

So I can't find the location where it may have been installed although I did get the message that the instal procedure was success.

I got the information from the present Eclectic Light website here

I looked at your link and decided it was a step too far. The "Don't worry you can always download the OS again and keep all your files intact" put me off. (I worry I will lose Lightroom)

Re: Using Scripts to monitor SSD wear

Avatar Trevor Hewson
Rick, I know you like a challenge but it sounds like it might be time to ask yourself whether you really need to monitor the condition of your SSD?

Re: Using Scripts to monitor SSD wear

Avatar Tony Still
I don't currently have time to research it but these 'traditional' locations for user items are one of the obvious targets for Apple's security overhaul in Big Sur. I alluded to this previously - your problem may be as simple as "it's somewhere else now".

You found a reference to "Relocated Items": that's a relatively recent security mechanism whereby the installed position of an item is randomised; that makes it harder for a malicious item to subvert legitimate components and their permissions.

I'm sure there is a way to get this working, which might be quite simple, but Trevor's question is well worth considering.

Re: Using Scripts to monitor SSD wear

Avatar Rick Churchill
What started me down this road is that having upgraded my Games PC (to one which is housing one of the most powerful graphics cards in the world) I now want to sell my old PC. Incidentally the PC without keyboard and screen was even more expensive than an iMac! Although of course I'm not comparing Apples and .....

The PC had a 1TB SSD but due to only having 8GB of memory, and some games required more than twice that, was swapping data on and off the SSD, potentially wearing it out. I was interested to know whether I should sell the 1TB drive with the old PC or whether it was worth keeping. The wear rate would have determined that.

I have since learned that Samsung have the Magician app that can do this so I will probably go that route although I would have liked to know how my Mac SSD is getting on.

Re: Using Scripts to monitor SSD wear

Avatar Rick Churchill
Just a final note to say that I have discovered that most SSD manufacturers have free downloadable software to test their products, although they seem to be only for PCs. As far as Samsung’s Magician software, the SSD has to be plugged directly into the motherboard (not via a USB interface).
The software shows that my 850 EVO 1 TByte (SATA interface) device has had 27 TBytes written to it and Samsung still considers the SSD to be in Good condition.
I can't find a simple solution to monitor my 1 TByte Mac SSD.