[Gentoo] Console-based hardware monitoring

The hub of Aura activity, the cortex that binds the forum together.
Post Reply
nik-w
Scavenger
Posts: 15
Joined: Fri Aug 15, 2008 11:31 pm

Post by nik-w » Wed Oct 01, 2008 12:03 am

Ok, so my server may be ill. All *seems* well (minus the odd wobble here and there - including the most amusing error message to date the other day: "bread failed"), but the BIOS is not happy - not happy at all. It's problem is that it says the CPU fan has failed. When I go into the BIOS, it shows that the fan is running but at a low speed (assumedly, being as it's in red). I was hoping to be able to monitor this in linux, but trying to find a console-based hardware monitor is not that easy. All I've found so far is app-admin/consolehm but that won't install (says "masked by missing keyword").

I don't know whether or not I trust the BIOS - I don't know what speed the fan is supposed to be running it. Given it's a variable-speed fan and I usually have the processor turned right down (so that the fan is hardly noticeable), I'm not sure it's so much of a problem - surely if the CPU started overheating, it'd do some sort of emergency shutdown? I had a look for new coolers but I can't find anything that is sufficiently small enough to fit such a small case! I need a cooler no bigger than 11cm x 8cm x 8cm!

I also have reason to suspect that memtest86+ may be a lying piece of junk. When turning my dual-boot computer on the other day, I decided to run memtest86 and it started throwing up errors left, right, and centre. I experimented with one memory stick at a time, then the same one in all four slots - every combination threw up the same errors! I'm wondering if it's because it's super-fast memory and that there's something about it that doesn't agree with the program.
User avatar
Chewi
Anti-Hero
Posts: 3521
Joined: Sat Jun 12, 2004 3:51 pm
Location: Edinburgh, Scotland

Post by Chewi » Wed Oct 01, 2008 9:35 am

Hmm. I'm not very clued up on the hardware monitoring side, I'm afraid. I have some CPU temperature monitors on my gkrellm, but they're mainly just there for my amusement. For that stuff to work, you need to enable the right sensor drivers in the kernel. I think lm_sensors might also be what you're looking for. I have it installed but I've never been totally sure what it's for because my gkrellm monitors seem to work without it. Check out this guide. Note that lm_sensors has refused to start for me lately. I'm not sure why. Also make sure you have all the relevant ACPI drivers enabled like processor and thermal.

Oh and I do trust memtest86+ because it correctly reported a problem with some RAM I had after months of trying to figure out why my system kept crashing. Your situation does sound odd though.
Last edited by Chewi on Wed Oct 01, 2008 9:39 am, edited 1 time in total.
User avatar
Matt
Noble Warrior
Posts: 4543
Joined: Mon Jun 14, 2004 1:39 pm
Location: England
Contact:

Post by Matt » Thu Oct 02, 2008 1:38 am

User avatar
Chewi
Anti-Hero
Posts: 3521
Joined: Sat Jun 12, 2004 3:51 pm
Location: Edinburgh, Scotland

Post by Chewi » Thu Oct 02, 2008 9:23 am

Nice find. Let's hope it's the right socket.

Just looked at app-admin/consolehm. The reason it says that is because it's for FreeBSD, not Linux. :P
User avatar
Matt
Noble Warrior
Posts: 4543
Joined: Mon Jun 14, 2004 1:39 pm
Location: England
Contact:

Post by Matt » Thu Oct 02, 2008 2:11 pm

The middle one is rather broad, but the other two are both 775/
nik-w
Scavenger
Posts: 15
Joined: Fri Aug 15, 2008 11:31 pm

Post by nik-w » Thu Oct 02, 2008 11:04 pm

The middle one might just fit being as it's a sort of tiered design - there's a row of capacitors right behind the CPU socket, so there's absolutely no way anything over 80-85mm at the base is going to fit, but they're only about 1cm high. The motherboard is a S754, so the other two wouldn't fit, anyway. Another idea I had was to just leave the heatsink in place and stick a new fan on top - something like this one.
nik-w
Scavenger
Posts: 15
Joined: Fri Aug 15, 2008 11:31 pm

Post by nik-w » Thu Oct 02, 2008 11:11 pm

Chewi wrote:Nice find. Let's hope it's the right socket.

Just looked at app-admin/consolehm. The reason it says that is because it's for FreeBSD, not Linux. :P
So why's it in the Gentoo repository? I thought BSD and Linux were fairly compatible with each other, anyway?
User avatar
Chewi
Anti-Hero
Posts: 3521
Joined: Sat Jun 12, 2004 3:51 pm
Location: Edinburgh, Scotland

Post by Chewi » Fri Oct 03, 2008 8:25 am

They are. That's why there's Gentoo/FreeBSD. :P But evidently hardware monitoring is something they do a bit differently, probably because FreeBSD doesn't have sysfs (the /sys directory).
nik-w
Scavenger
Posts: 15
Joined: Fri Aug 15, 2008 11:31 pm

Post by nik-w » Sat Oct 04, 2008 11:12 pm

Chewi wrote:They are. That's why there's Gentoo/FreeBSD. :P But evidently hardware monitoring is something they do a bit differently, probably because FreeBSD doesn't have sysfs (the /sys directory).
Oh well! Think I'll just look into buying a new fan for it or something - especially as I'm going away for a week - don't want it blowing up while I'm away:P

On an unrelated note, I noticed this today and decided to have a play with it. Before installing it, I ran "time emerge -p world" three times and took the average time over the 3 attempts (which came out to 16.9 real / 16.53 user / 0.395 sys). I then tried it with the sqlite business and instead of being quicker, it was actually slower (17.46/16.68/0.377), so I removed it and timed it again just to make sure and found that it was quicker without sqlite (16.763/16.0/0.381). I suppose it's not that surprising, as if portage was substantially quicker running sqlite, it'd ship that way!
User avatar
Chewi
Anti-Hero
Posts: 3521
Joined: Sat Jun 12, 2004 3:51 pm
Location: Edinburgh, Scotland

Post by Chewi » Sun Oct 05, 2008 10:53 am

I've been reluctant to try these Portage speed-ups because they do seem to need tweaking from one Portage version to the next and with the amount of Gentoo development I do, I don't want to introduce any quirks into the system. Java dependencies are hairy enough as it is!

One safe speed-up I do use is cache.metadata_overlay.database but the only major difference it makes is to prevent the need to do a meta-data transfer after an emerge --sync. Normally builds the meta-data cache after syncing and stores it in /var/cache/edb/dep/usr/portage but there is already a pre-generated cache available in /usr/portage/cache. It's in a slightly different format but the cache.metadata_overlay.database module makes it possible to use it. I'm not quite sure what this pre-generated cache is actually for and why it's in a different format but hey!

That SQLite speed-up should have made a significant different though so maybe something went wrong. I recently read that the reason they don't use it officially is because SQLite is C-based and if something were to go wrong with it, you might see something like this.

Code: Select all

# emerge world
Segmenation fault
For a regular user, that's quite scary. It would not be possible to provide a more meaningful error because a crash in SQLite would take the Python intrepreter with it. I have sometimes wondered if it would be possible for interpreters to sandbox these kind of crashes but that probably depends on some deep-rooted OS issues.

If you really want to see a major speed-up, try Paludis or pkgcore. These are drop-in Portage replacements. Paludis is written in C++ and is very fast. pkgcore is written in Python like Portage is but the most speed-critical parts are written in C. Paludis is older and more mature than pkgcore but I hear pkgcore is coming along nicely. I know that Paludis has a few deliberate compatibility issues where pkgcore is probably more like Portage in its behaviour. I say deliberate because the Paludis developers disagree with a lot of the things that Portage does and this has created a massive rift between the Paludis developers and the Gentoo community. It's not that their points aren't valid but they come off as a very elitist bunch and the resulting flamewars have driven a lot of Gentoo developers away. I don't want to go into this much more but despite what people think of the developers, Paludis seems to be quite highly regarded. The only reason I haven't tried it is because of what I said at the start of this post.
Last edited by Chewi on Sun Oct 05, 2008 10:53 am, edited 1 time in total.
nik-w
Scavenger
Posts: 15
Joined: Fri Aug 15, 2008 11:31 pm

Post by nik-w » Wed Oct 08, 2008 1:46 am

Chewi wrote:One safe speed-up I do use is cache.metadata_overlay.database but the only major difference it makes is to prevent the need to do a meta-data transfer after an emerge --sync.

That SQLite speed-up should have made a significant different though so maybe something went wrong.
I have my box sync in the middle of the night anyway, so I wouldn't notice any difference there - it's just the actual searching of the database that takes forever. Wherever possible, I use eix to search for stuff, but when you ask portage to actually emerge something, it takes it ages to get it's shit together!:p I dunno if the SQLlite thing didn't work properly or not - it certainly created a database, but whether or not it was being used by portage, I don't know! Might have another play with it on Thursday!
Last edited by nik-w on Wed Oct 08, 2008 1:48 am, edited 1 time in total.
Post Reply