SUSE root Logo
 
SUSEroot.com

 Home -> SUSE Linux Adventures -> Torsmo
 
 Main Menu
 Recent Blog Posts
KDE, WTF

NetIQ Video

Treo 700p Tether with Linux

SUSE 10.2 on Dell Optiplex 320

SUSE 10.2

...the blog

 Using Torsmo to Monitor Hardware

Keeping track of the temperature inside your machine, voltages, disk space, CPU usage, network traffic, and memory usage can be useful for a variety of reasons. There are applications that can display this information right on your Linux desktop. SuperKaramba, GKrellM, countless dock apps, Torsmo, and several other packages can all accomplish this. Of these, my favorite is Torsmo because it is light, very customizable, and pure utility. If you're looking for flashy icons and "cool" graphics, one of the other options might be better for you.

I'll run through a basic installation and modification of Torsmo. Torsmo itself is very easy to install and use, CPU usage, memory usage, uptime, disk space, network traffic, battery capacity, and a few other stats will be available right away. But to monitor most temperature sensors, fans, and voltages, you'll need to have lm_sensors and I2C working. This has PITA potential; I have a walkthrough on how to get lm_sensors and I2C running to get you started.

Whether or not you decide to try and get I2C and lm_sensors running to monitor temps and such is up to you; Torsmo is very handy even without those things. My laptop is built around a cheap mobo that does not provide any standardized monitors (nothing for I2C to work with), but I still use Torsmo for all the other features.

Get Torsmo

My usual places for locating SUSE rpms did not have any for Torsmo, so you'll have to compile from source (it's more manly anyway). You are welcome to download my SUSE 9.1 i686 RPM here; it was made using the "checkinstall method". You can download the source for the latest version of Torsmo (0.18 as of 5 April 05) here.

Install

If you downloaded an RPM or used mine, just right-click on it and install with YaST. If you downloaded the source you'll first need to configure. If you want to enable Xft fonts (unless you are just masochistic, you do) you should use: ./configure --enable-xft . Then run a make, su to root and either run a checkinstall (recommended) to build a simple RPM, or make install to just shove the binaries into your hard drive.

After install you should be able to type torsmo into a user terminal and something should appear on your desktop. You may see some error messages in the terminal you used, not a huge deal yet, we're going to tweak it to do what you want.

Tweaking Torsmo

If you compiled from source, there should be a torsmorc.sample in the source folder you extracted, copy it to your home folder and rename it .torsmorc (notice the leading dot). Right-click on it and open it with your favorite text editor.

TorsmoIf you downloaded an RPM, you can get the exact same file (for 0.18) here; just copy the text paste it into a text editor and save it as .torsmorc in your home folder (notice the leading dot).

This is the file that will control what Torsmo displays and how. Obviously any modifications you make will not be visible until you save the file and restart Torsmo. Start at the top of the file and modify it to fit how you want it to look. Most of the options are self-explanatory, I'll hit on some that may not be. The first option, "background", when set to "no" will run Torsmo from the terminal; close the terminal and Torsmo will close, "yes" will start Torsmo, then give you a prompt at the terminal to use it for something else. If you used my suggestion of enabling Xft Fonts, you can enable them here and chose your font; if you did not configure for Xft Fonts, you can just pick from the options listed.

Xft alpha set closer to 0 (zero) will make the text brigher, closer to 1 (0.9 or 1, for example) will make the text more faint. The update interval can be set very low (0.1) for frantic near real-time monitoring or around 5.0 (default) for more sane viewing. I actually tried it as low as 0.01 out of curiosity and it worked. I set double buffer to yes to kill the flicker, but it also made root-tail disappear. Experiment with the alignment and gaps to position the output where you want.

In the middle section you'll see the variables you have to play with in the display. Pretty well documented and once you play with it a little, you'll understand more. I'll add that while SETI@home variables are listed, I was unable to get them to work and I have not found anyone who has.

The bottom section of the .torsmorc file is the format of the display. You can rearrange, remove, and add whatever is available. For example, I removed the kernel display, nodename, etc. because I know what all this stuff is. I also rearranged a lot to make it more comfortable for me. You can see the .torsmorc file I am currently using here. On my more commonly used laptop, I also have the battery function displayed.

A cool feature worth mentioning is the exec & execi functions. These will execute a bash command and display the output when Torsmo is started or at intervals you set, respectively. I first thought running cal -y would be cool, but it did not line up properly. I have seen scripts mentioned here and there on the internet that will display weather and other cool stuff to take advantage of this feature. Do some searching to see what turns up.

lm_sensors & I2C

If you configured I2C and lm_sensors and you hardware supports it, you should be able to view temps, voltages, fan speeds, etc. In fact, some temperatures and fans may be available via ACPI as described in the .torsmorc file.

The best way to see what goes where is to go to /sys/bus/i2c/devices . You should see one or more folders, hopefully inside some of these folders you'll find some files like temp 1_input (temperature), in 0_input (voltage), and fan 2_input (fans). These will indicate what you might be able to see in Torsmo. For example, to view the temperature from the second sensor you'd use the variable ${i2c 1-0290 temp 2} where "1-0290" is the name of the folder under /sys/bus/i2c/devices .

When trying to decide what temp is what, it is safe to assume that the hottest temperature will be the CPU, others may be on the motherboard or in the power supply. Fan speeds are easy enough to determine because all you have to do is stick your finger in a fan and watch for a drop in RPMs. For the "slower" among us, I'll point out that stopping your CPU fan with your finger (or anything else) is a horrible idea, even slowing it down for more than a few seconds could result in a lot of char-broiled hardware.

Determining voltages is tricky; you may find some of this information in BIOS or it may be flashed on screen during POST. Unless you are overclocking, the 1.something number will be your Vcore (CPU) and the steady 2.5 number will be your +2.5V. You're on your own from there. Searching Google for "your-mobo-model sensors" might lead to some more info.

Run Torsmo on Startup

You want Torsmo to start automatically when you log in, right? Here's how; of course the command you'd add would be torsmo &.
SiteMap
SUSEroot.com © 2004 by Damian Smith. Trademark and copyleft information is covered on the About SUSEroot page. Contact me at damian@suseroot.com