Conky cpu temp w/Asrock 4coreDual-VSTA

timzak

Member
Feb 23, 2007
117
0
0
I'm trying to get Conky to do a cpu temp readout via ACPI on my 4coreDual-VSTA and I'm getting a reading of 0 C. I've been told that this doesn't work with some motherboards...perhaps my Asrock is one of those? Anyone have any luck getting this working on a 4coreDual-VSTA?

Thanks.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
I donno about 'via acpi' or whatnot, but I've always just used sensorsd and such. Set that up and then conky can pull the temperatures through that.



Always be sure to mention what sort of distribution your using. You generally use system scripts to setup hardware sensors and those can differ somewhat between distributions.


Generally for Ubuntu or Debian you want to install the lm-sensors package, run the 'sensors-detect' script, make sure that they add the modules names to /etc/modules so that they get loaded when you reboot.

Then when you run 'sensors -s' command you should see a text output showing you the current readings.

Usually not all the readings are usefull. Some may need some tweaking to make them accurate, but most of the time they work pretty well. Once you do that then conky can be configured to use those readings.
 

timzak

Member
Feb 23, 2007
117
0
0
Thanks, and sorry. I'm using Ubuntu 7.04. I just installed lm-sensors, ran sudo sensors-detect, and said yes when it asked me if I wanted to add to /etc/modules. Then when I ran sensors -s it said it couldn't find anything. I checked in /etc and there is no 'modules' folder there. There's a folder called modprobe.d and a folder called modutils, but no modules. Here's a transcript of sensors-detect:
$ sudo sensors-detect
# sensors-detect revision 4171 (2006-09-24 03:37:01 -0700)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

We can start with probing for (PCI) I2C or SMBus adapters.
Do you want to probe now? (YES/no): y
Probing for PCI bus adapters...
Use driver `i2c-viapro' for device 0000:00:11.0: VIA Technologies VT8237A South Bridge

We will now try to load each adapter module in turn.
Module `i2c-viapro' already loaded.
If you have undetectable or unsupported adapters, you can have them
scanned by manually loading the modules before running this script.

We are now going to do the I2C/SMBus adapter probings. Some chips may
be double detected; we choose the one with the highest confidence
value in that case.
If you found that the adapter hung after probing a certain address,
you can specify that address to remain unprobed.

Next adapter: NVIDIA i2c adapter 2 at 1:00.0
Do you want to scan it? (YES/no/selectively): y
Client found at address 0x4c
Probing for `National Semiconductor LM75'... No
Probing for `Analog Devices ADT7466'... No
Probing for `Dallas Semiconductor DS1621'... Success!
(confidence 3, driver `ds1621')
Probing for `Analog Devices ADM1021'... No
Probing for `Analog Devices ADM1021A/ADM1023'... No
Probing for `Maxim MAX1617'... No
Probing for `Maxim MAX1617A'... No
Probing for `TI THMC10'... No
Probing for `National Semiconductor LM84'... No
Probing for `Genesys Logic GL523SM'... No
Probing for `Onsemi MC1066'... No
Probing for `Maxim MAX1619'... No
Probing for `National Semiconductor LM82/LM83'... No
Probing for `National Semiconductor LM90'... No
Probing for `National Semiconductor LM89/LM99'... No
Probing for `National Semiconductor LM86'... No
Probing for `Analog Devices ADM1032'... No
Probing for `Maxim MAX6657/MAX6658/MAX6659'... No
Probing for `National Semiconductor LM63'... No
Probing for `Fintek F75363SG'... No
Probing for `Maxim MAX6633/MAX6634/MAX6635'... No
Probing for `Analog Devices ADT7461'... No
Probing for `Fintek F75383S/M'... No
Client found at address 0x70
Probing for `Philips Semiconductors PCA9540'... No

Next adapter: NVIDIA i2c adapter 1 at 1:00.0
Do you want to scan it? (YES/no/selectively): y

Next adapter: NVIDIA i2c adapter 0 at 1:00.0
Do you want to scan it? (YES/no/selectively): y
Client found at address 0x37
Client found at address 0x50
Probing for `Analog Devices ADM1033'... No
Probing for `Analog Devices ADM1034'... No
Probing for `SPD EEPROM'... Success!
(confidence 1, driver `eeprom')
Probing for `EDID EEPROM'... Success!
(confidence 8, driver `eeprom'), other addresses: 0x51 0x52 0x53 0x54 0x55 0x56 0x57
Probing for `Maxim MAX6900'... No

Next adapter: SMBus Via Pro adapter at 0400
Do you want to scan it? (YES/no/selectively): y
Client found at address 0x51
Probing for `Analog Devices ADM1033'... No
Probing for `Analog Devices ADM1034'... No
Probing for `SPD EEPROM'... Success!
(confidence 8, driver `eeprom')
Client found at address 0x53
Probing for `Analog Devices ADM1033'... No
Probing for `Analog Devices ADM1034'... No
Probing for `SPD EEPROM'... Success!
(confidence 8, driver `eeprom')
Client found at address 0x69
Client found at address 0x6a

Some chips are also accessible through the ISA I/O ports. We have to
write to arbitrary I/O ports to probe them. This is usually safe though.
Yes, you do have ISA I/O ports even if you do not have any ISA slots!
Do you want to scan the ISA I/O ports? (YES/no): y
Probing for `National Semiconductor LM78' at 0x290... No
Probing for `National Semiconductor LM78-J' at 0x290... No
Probing for `National Semiconductor LM79' at 0x290... No
Probing for `Winbond W83781D' at 0x290... No
Probing for `Winbond W83782D' at 0x290... No
Probing for `Winbond W83627HF' at 0x290... No
Probing for `Silicon Integrated Systems SIS5595'... No
Probing for `VIA VT82C686 Integrated Sensors'... No
Probing for `VIA VT8231 Integrated Sensors'... No
Probing for `AMD K8 thermal sensors'... No
Probing for `IPMI BMC KCS' at 0xca0... No
Probing for `IPMI BMC SMIC' at 0xca8... No

Some Super I/O chips may also contain sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): y
Probing for Super-I/O at 0x2e/0x2f
Trying family `ITE'... No
Trying family `National Semiconductor'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Fintek'... Yes
Found `Winbond W83697HF Super IO Sensors' Success!
(address 0x290, driver `w83627hf')
Probing for Super-I/O at 0x4e/0x4f
Trying family `ITE'... No
Trying family `National Semiconductor'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Fintek'... No

Now follows a summary of the probes I have just done.
Just press ENTER to continue:

Driver `ds1621' (should be inserted):
Detects correctly:
* Bus `NVIDIA i2c adapter 2 at 1:00.0'
Busdriver `UNKNOWN', I2C address 0x4c
Chip `Dallas Semiconductor DS1621' (confidence: 3)

Driver `eeprom' (should be inserted):
Detects correctly:
* Bus `NVIDIA i2c adapter 0 at 1:00.0'
Busdriver `UNKNOWN', I2C address 0x50 (and 0x51 0x52 0x53 0x54 0x55 0x56 0x57)
Chip `EDID EEPROM' (confidence: 8)
* Bus `SMBus Via Pro adapter at 0400'
Busdriver `i2c-viapro', I2C address 0x51
Chip `SPD EEPROM' (confidence: 8)
* Bus `SMBus Via Pro adapter at 0400'
Busdriver `i2c-viapro', I2C address 0x53
Chip `SPD EEPROM' (confidence: 8)

EEPROMs are *NOT* sensors! They are data storage chips commonly
found on memory modules (SPD), in monitors (EDID), or in some
laptops, for example.

Driver `w83627hf' (should be inserted):
Detects correctly:
* ISA bus address 0x0290 (Busdriver `i2c-isa')
Chip `Winbond W83697HF Super IO Sensors' (confidence: 9)

I will now generate the commands needed to load the required modules.
Just press ENTER to continue:

To make the sensors modules behave correctly, add these lines to
/etc/modules:

#----cut here----
# I2C adapter drivers
# modprobe unknown adapter NVIDIA i2c adapter 0 at 1:00.0
# modprobe unknown adapter NVIDIA i2c adapter 1 at 1:00.0
# modprobe unknown adapter NVIDIA i2c adapter 2 at 1:00.0
i2c-viapro
# Chip drivers
ds1621
eeprom
w83627hf
#----cut here----


Do you want to add these lines to /etc/modules automatically? (yes/NO)yes
 

timzak

Member
Feb 23, 2007
117
0
0
Okay, I guess I needed to reboot. Now when I run sensors -s as root, it comes back with nothing:
tim@tim-desktop:~$ sudo sensors -s
tim@tim-desktop:~$

Any ideas?

Thanks.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
just run 'sensors' by itself. 'sensors -s' doesn't actually do any output... It's for something else, look at the man file.

Sorry for being misleading.
 

timzak

Member
Feb 23, 2007
117
0
0
No problem, I appreciate your help. I'll try just 'sensors' this afternoon when I get home from work and report back here.

Thanks!
 

timzak

Member
Feb 23, 2007
117
0
0
Hi, okay things appear to work. How do I have conky read the sensor info from lm-sensors?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Well to get conky to work you have to edit the ~/.conkyrc file.

It's a bit of a headfull at first, but once you get the idea you can go and look at the sample configuration files on conky's home site and copy what they have.

Here is what I have. This shows 'system temp' and 'cpu temp'

${color lightgrey}CPU Temp:$color${i2c 9191-0290 temp 2}+10 $alignr${color l ightgray}Sys Temp:$color${i2c 9191-0290 temp 1}

Notice the 'i2c' keyword.

If you check out your /etc/sensors.conf and then do a search for the beginning of your chipset name then you can find out what corrisponds to what.

/etc/sensors.conf is a file that just changes the 'temp1' to a more useful string like 'cpu temp' and then often is used to perform calculations to get the right voltage or temp reading.

So here is my sensors output:
w83627ehf-isa-0290
Adapter: ISA adapter
VCore: +1.32 V (min = +0.00 V, max = +1.74 V)
in1: +12.51 V (min = +13.46 V, max = +12.62 V) ALARM
AVCC: +3.31 V (min = +1.52 V, max = +3.68 V)
3VCC: +3.33 V (min = +3.76 V, max = +3.57 V) ALARM
in4: +2.04 V (min = +1.00 V, max = +2.04 V)
in5: +1.58 V (min = +2.04 V, max = +1.77 V) ALARM
in6: +5.07 V (min = +5.09 V, max = +6.53 V) ALARM
VSB: +3.25 V (min = +4.08 V, max = +2.91 V) ALARM
VBAT: +3.09 V (min = +4.05 V, max = +0.45 V) ALARM
in9: +1.58 V (min = +1.51 V, max = +1.91 V)
Case Fan: 1088 RPM (min = 927 RPM, div = 8)
CPU Fan: 0 RPM (min = 55 RPM, div = 128) ALARM
Aux Fan: 0 RPM (min = 55 RPM, div = 128) ALARM
fan4: 0 RPM (min = 10546 RPM, div = 128) ALARM
fan5: 0 RPM (min = 85 RPM, div = 128) ALARM
Sys Temp: +27°C (high = -41°C, hyst = -66°C) ALARM
CPU Temp: +16.0°C (high = +80.0°C, hyst = +75.0°C)
AUX Temp: +45.5°C (high = +80.0°C, hyst = +75.0°C)


So I do a search through the file for w83627ehf and I find out that people figure that temp 2 is for cpu and temp 1 is for system.

Notice that my temperature is off. I don't know why, I figure the sensor is just very innaccurate at low temperatures. It would gives the same reading in the bios except in the bios when you go to the hardware sensors screen it puts a artificial load on cpu to raise it's temperature. Took me a while to figure out what was going on...

I figure it's because my cpu is operating right around room temperature, do to my massive 'ninja' heatsink. So that is why I have the +10 on there to remind myself of this. I figure it can't be off by more then 10 degrees.

Oh well.

One of the reasons I like conky is because I can show per cpu core usage, which is neat.
${color lightgrey}CPU0 Usage:$color ${cpu cpu1}% ${cpubar cpu1}
${color lightgrey}CPU1 Usage:$color ${cpu cpu2}% ${cpubar cpu2}


One of the things that I noticed that kinda sucked was I have it setup to monitor network connections also, because I saw a screenshot of it and thought it looked usefull. Unfortunately the sample configuration that guy was using used FQDN to identify connections. For my network this was too slow to run every second or so and it made conky behave badly, do changed it to do ip addresses.

Luckily conky has pretty complete documentation.
http://conky.sourceforge.net/

So you can find out all the little secret things it can do. For example the music player I like to use is called MPD. It's network/unix oriented so it's easy to combine with other programs. Conky supports displaying song info from that. Also it supports xmms.

Also you can write your own little bash scripts or programs to display output into conky, but the tricky part is that they have to be very simple and quick so that they don't have a adverse impact on system performance or conky refresh rates.


Ubuntu has some stuff on it:
https://help.ubuntu.com/community/HowtoConky140
 

timzak

Member
Feb 23, 2007
117
0
0
Thanks, drag. That was an awesome post. I finally got it figured out. Unfortunately, temp1 and temp2 that 'sensors' detects turn out to be Northbridge and case temps. I started comparing sensor temps between Windows and Ubuntu using a known good program in Windows (Speedfan). Speedfan detects INTELCORE0 and INTELCORE1 for my Core2Duo processor, in addition to W83697HF for temp1 and temp2. Using a Windows program called Orthos which pegs both cores to 100% usage to heat them up, it was easy to watch the temps and figure out what was what. So the bottom line is lm-sensors doesn't detect anything like INTELCORE*, and I have no idea how to detect these temps in Ubuntu. The other weird thing I noticed is that when I compare temp1 and temp2 temps between Windows and Ubuntu, Ubuntu is always 2C lower. I don't know if it's less taxing on the system, or if it's simply a difference in how the sensors are being read/accessed. If you have anymore insight, I'd appreciate it. Otherwise, thanks for all your help.

Take care!