« Tripleheader | Main | Half a bubble off plumb »

Limited privilege

I suspected it would be frustrating to not be running the show, but I didn’t know quite how it would come up.

I’m working on system monitoring. Specifically, monitoring the health of a particular system, which happens to be running Gentoo on Dell hardware. Dell does not support Gentoo, specifically; if you’re going to run Linux on a Dell server, they’d rather you use Red Hat. There’s talk of re-building this server with Red Hat, but there are ramifications I won’t get in to here, and the decision isn’t mine anyway. (I don’t know the second thing about Gentoo vs. Red Hat, but I think I’d consider switching hardware vendors more quickly than switching distros. Just saying.)

Now, in any Linux there’s a lot you can learn about the system if you have read access to the /proc/ directory; in fact, last week I handed in a big C program centered on the idea of reading process data from /proc/[\d+]/status. (I wish I’d been able to write it in Perl, but the idea was to use system calls.) I can get a lot of the data I want there, like swap page-ins and page-outs; I just need to massage that data to present a vector (that is, change since last check) instead of a running tally. Should be a reasonable little project in Perl.

The thing I’m missing is CPU temperature. What I’ve been able to find out this evening is that there is an optional module (an LKM) to allow the Linux kernel to get this information from the BIOS and put it in /proc/ somewhere. This stands to reason; the operating system stands between the user and the hardware, so anything that talks to hardware (and the BIOS must be considered hardware) needs to be built into the system.

It looks like this module is not installed on the system in question, which is reasonable considering its circumstances. However, I can only say “Looks like,” because I don’t have enough privilege on the system to run lsmod and check. Even if it was loaded, that might not be the whole solution; apparently Dell distributes an RPM to expose this stuff to Red Hat, and there’s some question about whether it could be used on Gentoo. It’s possible that the RPM is, in fact, this kernel module, but I haven’t been able to find it and unpack it, nor could I install an LKM anyway; there are enough people using this system that it would be A Bad Thing if I crashed it by accident.

Really, though, I do miss being root.

Now Playing: Trying Your Luck from Is This It? by The Strokes

Post a comment