Updated SmartMonTools/GSmartControl for newer Pups

Core libraries and systems
Post Reply
Message
Author
User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

Updated SmartMonTools/GSmartControl for newer Pups

#1 Post by Mike Walsh »

Evening, boys & girls.

Now then:-

I've been using GSmartControl to keep an eye on the health of my hard drives, etc, ever since I started with Puppy a few years ago. The old 0.8.5 version, dating all the way back to Lucid's hey-day, has been floating around the Forum for years.....pretty much working on any Pup you can think of. It has, however, 2 big disadvantages:-

1) It won't read external USB hard drives/SSDs, even if they have S.M.A.R.T data available.
2) It doesn't give correct data for SSDs anyway; according to GSmtCtl, most SSDs have a 'failing', old-age 'attribute'.....and should be replaced immediately!!!

I can't be the only one with these external USB hard drives, etc, who wants to keep an eye on what they're doing.....so I decided to do summat about it.

--------------------------------------------------------------

I've been having a 'nose around' today, to see what's happening with the combo of GSmartControl and smartmontools (which provides the 'back-end' to all of this, and does the 'heavy-lifting' for the front-end GUI.)

According to this forum thread from dslreports.com, until very recently the only way to get this info from an external USB hard drive was to physically remove the drive from its enclosure, and then connect it directly to your mobo with an eSATA adapter cable. (External SATA hard drives in an enclosure, connected with a permanent eSATA cable, never had this problem. It's caused by the SATA-to-USB adapter that most of these portable/aftermarket desktop drives use.)

Lotsa messing around.....for relatively little return, in 'real' terms. I certainly wouldn't want to do this on a regular basis; the enclosure for my Seagate 3 TB desktop drive would give up the ghost before long.....

Seems the latest version of smartmontools, the 'back-end' stuff, released around a year ago, has addressed this problem, and can now 'talk' directly to a USB-to-SATA interface. So, I visited SmartMonTools website, downloaded the source code for v6.6, and have spent this afternoon and evening compiling, and devising workarounds.

This version of smartmontools even includes support for the very new NVMe solid-state drives. Accordingly, I've compiled it with the '--with-nvme-devicescan' option.....so if you have one of these supposedly hyper-fast devices, you'll also benefit from this update.

I've concentrated on the recent 32-bit Pups today, and have workarounds in place for Tahr 6.06, Xenialpup, and peebee's Upup Bionic. So, here's what you do:-

---------------------------------------

Tahr 6.0.6

For Tahrpup, I've compiled the v6.6 binaries, and assembled them, together with gsmartcontrol-0.8.7 from the Debian 'Jessie' repo. You can download the resulting .pet for this from here.

---------------------------------------

Xenialpup

Again, I've compiled the v6.6 binaries. For Xenialpup, do the following:-

IMPORTANT: Update the PPM first.

1) Install smartmontools from the PPM. You need to do this in order to get all the .conf files and stuff in place; it won't work properly otherwise.

2) Install gsmartcontrol from the PPM.

3) Download, and install this .pet from my G-Drive. It overwrites the smartctl and smartd binaries in /usr/sbin with the newest version, 6.6.

You may need to re-boot for this to take effect.

You can now read S.M.A.R.T data directly from any external USB drive. This even works for USB flash drives, although of necessity you only get basic info from these.....they simply don't provide detailed information. It's good enough to see if they have a clean 'bill of health', though.

-----------------------------------------

Upup Bionic

And again; the v6.6 binaries were compiled first. For Bionic, the 'workaround' was a wee bit more complicated, and necessitated 'borrowing' some bits'n'bobs from Xenialpup; not the first time I've had to do this! The problem stems from the fact that you cannot start the gsmartcontrol binary directly, like you can the others. It appears to have been compiled in such a way as to require starting, from a 'normal user', with sudo 'root' permissions and inputting a password in the process. Starting it directly as /root merely brings up a window telling you off for not having 'sudo' installed..!

We do not want frickin' SUDO in Puppy, do we, boys and girls?? Image Image

No, indeedy!

So; here's what ya do:-

IMPORTANT: Update the PPM first.

1) Install 'smartmontools' from the PPM. Again, this is needed to get all the config files'n'stuff in place.

2) Install 'gsmartcontrol' from the PPM. We won't be using the binary itself, but there's other stuff you have to have along with it.

3) Download, and install this .pet. What this does is three-fold:-

a) It places the Xenialpup gsmartcontrol binary in /usr/bin. Bionic, through the PPM, places that binary in /usr/sbin, and the only thing you'll find in /usr/bin is the afore-mentioned script that wants you to call the binary with sudo permissions. :roll:

b) Again, it overwrites the smartctl and smartd binaries in /usr/sbin with the latest version, v6.6.

c) Finally, it overwrites the gsmartcontrol.desktop file in /usr/share/applications with a modified one that calls the Xenialpup binary in /usr/bin instead.

And that....should be that. All 'good to go'! (Again, a re-boot may be required at this point.)

************************

GSmartControl reading the 'S.M.A.R.T-enabled' status of my external 3TB USB drive in Upup Bionic:-


Image


----------------------------------------------

I hope to be sorting out the binaries & other stuff for Xenialpup64 and Bionicpup64 over the next couple of days, so.....watch this space.


Mike. :wink:
Last edited by Mike Walsh on Thu 25 Oct 2018, 16:29, edited 3 times in total.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#2 Post by Mike Walsh »

Morning, all.

As promised, here are the 'workarounds' for up-to-date GSmartControl in Xenial64 and Bionic64:.....

--------------------------------------------

Xenial64

IMPORTANT:- Update the PPM first.

1) Install smartmontools from the PPM. This makes sure you get the config stuff in place. The more recent 'buntus now install systemd 'stuff' along with this.

2) Install gsmartcontrol from the PPM.

3) Download and install this .pet. As with Xenial 32 above, this overwrites the 'smartctl' and 'smartd' binaries in /usr/sbin.

A re-boot may be necessary.

You can now read S.M.A.R.T data from external USB drives in Xenial64.

----------------------------------------------------

Bionic64

IMPORTANT:- Update the PPM first.

1) Install smartmontools from the PPM, to get the config stuff in place (because there's systemd 'stuff' to be placed, as well).

2) Install gsmartcontrol from the PPM.

3) Download and install this .pet. As with Upup Bionic, what this does is three-fold.

a) Overwites the smartctl and smartd binaries in /usr/sbin with v6.6 - in this instance, we're using the binaries I compiled for Xenial64 .

b) Places the gsmartcontrol executable from Xenial64 into /usr/bin.

c) Overwrites the gsmartcontrol.desktop file in /usr/share/applications with a modified one which calls the Xenial executable instead of the Bionic script which wants 'sudo' permissions.

As above, a re-boot may be necessary.

Now you can read S.M.A.R.T data from external USB drives/flash drives in Bionic64.

----------------------------------------------------

I haven't done a version for Tahrpup64, for the simple reason that I've recently deleted my Tahr64 install.....and I'm seriously debating whether to bother re-installing.

It was my very first 64-bit Pup, and I'd done so much experimenting with it over the last 2-3 years that it was in a real mess. With Tahr rapidly approaching EOL, plus the fact that it had always been somewhat problematic in many areas, I'm going to stick with the newer 64-bit Pups. Two's enough to be going on with, I think.....and Xenial64 is just so much smoother, in every way. (Don't get me wrong; Phil did his usual wonderful job with Tahr64, but as we all do, he's learnt from the experience, with the result that subsequent 64-bit Pups are just SO much better !)

Hope some of you find these 'workarounds' useful. Enjoy.


Mike. :wink:

sheldonisaac
Posts: 902
Joined: Mon 22 Jun 2009, 01:36
Location: Philadelphia, PA

Re: Updated SmartMonTools/GSmartControl for newer Pups

#3 Post by sheldonisaac »

Thanks a lot, Mike Walsh!
Mike Walsh (in part) wrote:For Xenialpup, do the following:-
IMPORTANT: Update the PPM first.
1) Install smartmontools from the PPM. You need to do this in order to get all the .conf files and stuff in place; it won't work properly otherwise.
2) Install gsmartcontrol from the PPM.
3) Download, and install this .pet from my G-Drive. It overwrites the smartctl and smartd binaries in /usr/sbin with the newest version, 6.6.
You may need to re-boot for this to take effect.
I did all of those. Results are below.
Hope to do the USB things soon.
Thanks again!
smartctl -H -i /dev/sda |more
smartctl 6.6 2017-11-05 r4594 [i686-linux-4.1.2-EmSee-32-pae] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Crucial/Micron RealSSD m4/C400/P400
Device Model: M4-CT128M4SSD2
Serial Number: 000000001223090C8648
LU WWN Device Id: 5 00a075 1090c8648
Firmware Version: 070H
User Capacity: 128,035,676,160 bytes [128 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-2, ATA8-ACS T13/1699-D revision 6
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Wed Oct 24 08:45:30 2018 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
Dell E6410: BusterPup, BionicPup64, Xenial, etc
Intel DQ35JOE, Dell Vostro 430
Dell Inspiron, Acer Aspire One, EeePC 1018P

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#4 Post by Mike Walsh »

@ sheldon:-

You very welcome, mate. Hope it's of some use to you.....for a long while to come.


Mike. :wink:

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#5 Post by Mike Walsh »

For anybody who's interested, you can get the newer SmartMonTools running in Upup Raring, by simply installing the older GSmartControl 0.8.5, then replacing the smartctl and smartd binaries in /usr/sbin with the ones I compiled for Tahr 6.0.6.

I cannot for the life of me remember where I got the .pet for this from (it was at least 3 years ago), so I'm providing a link for it here at my GDrive:-

gsmartcontrol-0.8.5-i386.pet:-

https://drive.google.com/file/d/11G0F8i ... sp=sharing

Install this, followed by the upgraded 'SmartMonTools (v6.6)':-

SmartMonTools-6.6-upgrade.pet:-

https://drive.google.com/file/d/1XKhfEV ... sp=sharing

.....which just overwrites the SmartMonTools binaries in /usr/sbin with the new versions.

-------------------------------------

Now you can obtain S.M.A.R.T information from external USB drives, and correct info for SSDs, in Raring.

Hope these are useful.


Mike. :wink:

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#6 Post by Mike Walsh »

Evening, all.

I attempted to get the new SmartMonTools working in Precise 571 by following the same procedure as I did for Raring, above. While this worked fine for Precise running on the Compaq desktop, Precise on the old Dell lappie wasn't having it; didn't like it at all. Said it was unable to parse the new binaries in/usr/sbin... :?: :?:

So; I re-compiled SmartMonTools v6.6 in a pristine copy of 571 running 'live', with pfix=ram, and only the devx loaded. I had a try at packaging these together with the 0.8.7 GSmartControl Debian package mentioned above, but in Precise this says it wants libpng14.so.14. Now; after extensive searching, I simply cannot track this particular lib down anywhere at all.....in the Linux world, there seems to have been a mass migration from libpng12 straight to libpng16. Quite why this insists it wants a library that was apparently never generally available is beyond me.

Anyway, I've re-packaged the older 0.8.5, along with the Precise-compiled binaries. This works fine; it's functioning as expected on the old Dell, so I'm making this one available as well. If you're interested, you can find it here:-

https://drive.google.com/file/d/1MFfp2j ... sp=sharing

Now you can check SMART-enabled external USB drives in Precise, too.


Mike. :wink:

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#7 Post by Sylvander »

How about Slacko-5.7.0-pae? :D

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#8 Post by Mike Walsh »

Hi, Sylvander.

As far as I'm aware, you should be able to get things working in 570 by installing the older GSmartControl 0.8.5 package, then adding the SmartMonTools v6.6 'upgrade' .pet (which overwrites the binaries in /usr/sbin with the newer ones).

1) Install https://drive.google.com/file/d/11G0F8i ... sp=sharing :-

...followed by

2) https://drive.google.com/file/d/1XKhfEV ... sp=sharing

It'll be found in Menu->System->GSmartControl hardware information

--------------------------------------------------------

If that doesn't do the trick, I'll have a go at compiling the smartmontools binaries in 570, from a LiveCD, with pfix=ram and just the devx loaded - same as I did above for Precise. Won't be till tonight, though; I'm busy the rest of today.

Let me know what happens, please.


Mike. :wink:

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#9 Post by Sylvander »

a. Downloaded files ok.

b. Installed ok.

c. Appeared in the "Menu->System->GsmartControl".

d. Clicked to run = ok.

e. ERROR = "There was an error while executing smartctrl".
"Please specify the correct smartctrl binary in Preferences and press Ctrl-R to re-scan."

f. Execution log:
COMMAND = #1 "smartctrl" -V
Output = [my comment = nothing displayed]

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#10 Post by Mike Walsh »

Mm-hm. I kinda expected that, TBH.

I compiled the smartmontools binaries in Tahr 606....which uses the 2.19glibc. These binaries work in every Puppy in my kennels, including a few with much older glibc's.

I installed battleshooter's glibc-2.20 upgrade that he put together for Racy.....to be able to run Chrome. It also enabled use of many other things that wouldn't work before; Racy's original glibc is 2.11.

It worked so well that I installed it into most of the rest of the kennels, so the whole kennels now run with at least glibc 2.19, if not 2.20.

This has the unfortunate side-effect of leaving me in doubt whether my packages run in multiple Puppies because of this modification.....or in spite of it.

------------------------------------

I'll do a recompile for 570, and a re-package; it's still quite a popular Pup!

Watch this space.


Mike. :wink:

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#11 Post by Mike Walsh »

@ Sylvander:-

Give this one a try, and let me know how you get on with it:-

https://drive.google.com/file/d/1SMuGur ... sp=sharing

I've re-compiled the smartmontools binaries in a Slacko 570 (PAE) LiveCD, running pfix=ram, and with just the devx loaded. These have been packaged together with the GSmartControl 0.8.5 binary, which seems to run in everything. I suspect whoever originally compiled this one probably did so statically, which explains its universal acceptance by all Pups.

Let me know what happens, please. All feedback is useful!

Cheers.


Mike. :wink:

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#12 Post by Sylvander »

a. Downloaded new GSmartControl pet:
https://drive.google.com/file/d/1SMuGurJh_aP5D3sHrPr8Ctm8lh7xb7I0/view?usp=sharing

b. Downloaded previous "upgrade pet:
https://drive.google.com/file/d/1XKhfEV-mHYpLXWAS2tVapQhEvliSt-7_/view?usp=sharing

c. Installed pets a then b above ok.

d. Ran "Menu->System->GSmartControl ok.

e. Same error as previous effort. :(
[e and f above in my previous post.]

f. After each failure I don't save the session changes.
Hence the changes are lost; i.e. not saved for subsequent sessions.
And each new installation attempt begins afresh.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#13 Post by Mike Walsh »

@ Sylvander:-

Err.....you've lost me. I don't understand why you installed the previous upgrade .pet as well as the new one I linked you to.

The new .pet I put together was built specifically for Slacko 570 PAE. The binaries were compiled for it.

By installing the 'upgrade' .pet on top of it, you've overwritten the binaries for Slacko 570 with the other ones from Tahr 606. You didn't need to do that. Of course it's not working; the 'upgrade' smartmontools binaries for that one were compiled against a newer version of the glibc.

All you need to do is to install the new .pet I put together just for Slacko 570.....and nothing else. It contains everything needed for it to work in Slacko 570.

I can't make it any plainer than that, mate.


Mike. :wink:

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#14 Post by Sylvander »

Oops, sorry about that error. :(

a. This time around, I installed ONLY GSmartCtl-0.8.5_smt_6.6-slacko-i686.pet

b. Ran "Menu->System->GSmartControl" ok.

c. NO ERROR. :D
c1. Displayed both my internal HDD [which checked out as ok] and an "Unknown model" [don't know what that is, there's only 1 internal HDD and an optical drive connected].

d1. Tried to check out an external USB-connected HDD-in-an-enclosure by powering it on but that didn't add anything to the list of devices.
d2. Mounted one of the partitions on that drive [clicked on its icon and it showed the mounted symbol]...but it still didn't show.
d3. Tried "Re-scan Device List", and that dismounted the partition->[as shown by the mounted symbol on the icon] I mounted manually, but still not added to the device list.

e. Saved the session changes.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#15 Post by Mike Walsh »

@ Sylvander:-

Good, good; glad to hear it's now working.

That 'unknown model' will be the optical drive, since they're usually connected into the same motherboard system as the hard drives themselves. They don't, however, normally give S.M.A.R.T data since, although they're permanently connected, they don't contain anything until you put a disc into them.....and in any case, a CD/DVD isn't like a hard drive set-up anyway.

As for your external drive:-

If it was directly connected via an eSATA cable, it wouldn't be a problem.

If it was like my own external 'desktop' drive (just a USB connector, with an internal USB-to-SATA 'bridge' card), it wouldn't be a problem.

But; since you're no doubt using an external USB connected 'enclosure', with a SATA drive plugged in to that.....I wouldn't like to say. The newest version of smartmontools has got around the problem with these 'portable' HDDs everyone's using nowadays (my Seagate 'desktop' external is simply a bigger version of one of these), but unless the translation interface between the enclosure and the drive's SATA connector is set-up the same way as the 'bridge' cards employed by most drive manufacturers, I don't suppose it would work.

I don't know of any 'workaround' for that scenario, I'm afraid. Sorry about that. :(


Mike. :wink:

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#16 Post by Sylvander »

Mike Walsh wrote:I don't know of any 'workaround' for that scenario, I'm afraid. Sorry about that.
That's ok, that's just way it is. :D

Post Reply