Forum Home
Press F1
 
Thread ID: 87034 2008-02-05 07:32:00 Linux - conky Myth (110) Press F1
Post ID Timestamp Content User
637769 2008-02-05 07:32:00 Anyone by any chance know what the variable name is to get the cpu temp for an asus m2n based mobo? Myth (110)
637770 2008-02-05 07:40:00 Variable name?

Try lm_sensors.
Jen (38)
637771 2008-02-05 10:02:00 Linux sucks. It's broken. jermsie (6820)
637772 2008-02-05 10:31:00 Jen seems to be right (as usual :lol:): A fairly simple tool that can catch hardware problems before they become disasters.

A few years ago, a friend of mine had problems with his computer. It became unreliable; he would get odd errors, or the system would hang. He re-installed the operating system and his key applications, but the problems persisted. This cost him time, and his time is valuable.

The problem turned out to be simple: the cooling fan on his CPU's heat sink was dead. The overheating CPU, in turn, caused random problems. He wound up replacing the CPU as well as the heat sink, because the CPU had been damaged.

He could have avoided all of this if he had been running some sort of computer health monitoring system, such as lm_sensors.

lm_sensors is a set of Linux kernel modules for monitoring the vital signs of a computer: the voltages from the power supply, the temperature of the system and the CPU and fan speeds. lm_sensors includes a command-line utility for checking the current readings. A variety of graphical tools also are available for putting a pretty face on lm_sensors.
Installing lm_sensors

Before you attempt to install the lm_sensors kernel module, you should have the I2C driver modules installed. I2C, which stands for Inter-IC bus, is a simple serial data system for connecting chips so they can talk to one another. Most motherboards with health monitoring features use an I2C bus to access those features.

Make sure the I2C drivers are installed on your system. (If you build your own kernel, the I2C options are located under Character Devices.)

Install the packages that provide lm_sensors, or build it from source code and install. Then enter sensors-detect, a script that figures out how to install lm_sensors on your system. It will try various I2C modules and then try various lm_sensors modules, until it finds a combination that works on your system. When it is done, it provides instructions for how to set up configuration files in /etc, which load the correct modules when your system boots.

Once the modules for lm_sensors are installed and working, you can run the sensors command from a shell and receive some useful output. But you probably aren't done yet.
Customizing lm_sensors

Your next step is to edit the /etc/sensors.conf file. This file sets some custom parameters that make lm_sensors work with your computer system. For example, you can add a label that changes Temp1 to CPU Temp; you can disable Temp3 completely if you don't have a sensor and it is reporting nonsense; and you can customize the math functions used to calculate the displayed values.

Ideally, before you edit /etc/sensors.conf, you should reboot your computer and enter the BIOS setup screens. (For most computers, you hit the Del key or the F1 key during bootup to enter the BIOS. Check the owner's manual for your system, or watch the screen during bootup for a message like Hit <Del> to enter Setup.) The BIOS setup should have a sub-menu showing the same numbers you would like lm_sensors to report. Make a note of the readings you are seeing. For example, if the CPU temperature is about 60 degrees Celsius, write that down.

FROM: www.linuxjournal.com

Also a good discussion here: www.linuxformat.co.uk
beeswax34 (63)
637773 2008-02-05 10:44:00 Sounds like a bit of a dipstick, A visual inspection of the fans should have been done early in the piece. Metla (12)
637774 2008-02-05 18:19:00 Have since remembered to install lm_sensors while away from here (duh at the things we miss, but thanks anyway Jen... you were onto it :)) and discovered that the correct sensor file is stored at /sys/bus/pci/devices/0000:00:18:3.

Now ... how to pull that info to conky :confused:

Some suggestions include runing as script like:
echo $(($(cat /sys/bus/pci/drivers/k8temp/0000\:00\:18.3/temp1_input) / 1000))

or:

sensors | grep -A 1 'Core1' | cut -c13-16 | sed '/^$/d'

Which would be better, and is there a more correct way anyone can find?
Myth (110)
637775 2008-02-05 19:46:00 Ah, I just noticed the "conky" part. A quick google shows it is a system monitoring app. Now the "variable" part makes sense. :p

Anyhoo, conky looks pretty cute so I thought I would install it and I got my CPU temperature to show without any fancy work on my behalf. What I did:

Ran sensors-detect (as root) to set up the configuration for lm_sensors
Copied the script output at the end to /etc/rc.local
Rebooted the machine to get the modules to load
Downloaded a sample conkyrc from here (conky.sourceforge.net) to ~/.conkyrc
Ran conky from command and there it was it full glory

I used the config from this screenshot (conky.sourceforge.net) but I have ended up with a transparent background and it is currently wedged into the bottom left hand corner of my screen. Think I need to tweak some things in that ~/.conkyrc :p
Jen (38)
637776 2008-02-06 01:12:00 Wow, all that just for some info on system stats. Damn! beeswax34 (63)
637777 2008-02-06 02:48:00 Wow, all that just for some info on system stats. Damn!Not just some info on system stats, but a fully configurable app that gives you full control over it. It only took me a few minutes to set it up.

And very sexy too (www.imagef1.net.nz)! :p


BTW, for those observant people, my computer was named "Myth" long before Myth here became Myth ... confused huh? :waughh:
Jen (38)
637778 2008-02-06 03:06:00 BTW, for those observant people, my computer was named "Myth" long before Myth here became Myth ... confused huh? :waughh:

LOL :D
stu161204 (123)
1 2