You are not logged in.

#1 2010-12-28 14:28:32

xavi117
Member
Registered: 2009-11-07
Posts: 12

how log fan activity?

I have lenovo G560 notebook, and my fan is allways turnig on and off. I want to make log of this activity but i dont know how to find fan speed.
Is it possible that there is no sensor for fan speed?
is there any way to discover, if fan is on/off?

I tried lm_sensors and some other thigs:

$ sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:       +43.0°C  (crit = +127.0°C)   

sensors detect found no sensors

$ sudo sensors-detect
# sensors-detect revision 5895 (2010-12-12 17:54:35 +0100)
# System: LENOVO 20042 (laptop)
# Board: LENOVO Base Board Product Name

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.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): y
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
Intel Core family thermal sensor...                         No
Intel Atom thermal sensor...                                No
Intel AMB FB-DIMM thermal sensor...                         No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Some Super I/O chips contain embedded 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 `National Semiconductor'...                   No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      No
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor'...                   No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      No

Some hardware monitoring chips are 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 LM79' at 0x290...       No
Probing for `Winbond W83781D' at 0x290...                   No
Probing for `Winbond W83782D' at 0x290...                   No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): y
Using driver `i2c-i801' for device 0000:00:1f.3: Intel 3400/5 Series (PCH)
Module i2c-dev loaded successfully.

Next adapter: NVIDIA i2c adapter  (i2c-2)
Do you want to scan it? (YES/no/selectively): y

Next adapter: NVIDIA i2c adapter  (i2c-3)
Do you want to scan it? (YES/no/selectively): y

Next adapter: NVIDIA i2c adapter  (i2c-4)
Do you want to scan it? (YES/no/selectively): y
Client found at address 0x50
Probing for `Analog Devices ADM1033'...                     No
Probing for `Analog Devices ADM1034'...                     No
Probing for `SPD EEPROM'...                                 No
Probing for `EDID EEPROM'...                                Yes
    (confidence 8, not a hardware monitoring chip)

Next adapter: NVIDIA i2c adapter  (i2c-5)
Do you want to scan it? (YES/no/selectively): y

Next adapter: NVIDIA i2c adapter  (i2c-6)
Do you want to scan it? (YES/no/selectively): y

Next adapter: NVIDIA i2c adapter  (i2c-7)
Do you want to scan it? (YES/no/selectively): y
y
Next adapter: NVIDIA i2c adapter  (i2c-8)
Do you want to scan it? (YES/no/selectively): 

Next adapter: NVIDIA i2c adapter  (i2c-9)
Do you want to scan it? (YES/no/selectively): y

Sorry, no sensors were detected.
This is relatively common on laptops, where thermal management is
handled by ACPI rather than the OS.

acpi

$  cat /proc/acpi/thermal_zone/TZ00/*
0 - Active; 1 - Passive
<polling disabled>
state:                   ok
temperature:             47 C
critical (S5):           127 C
passive:                 0 C: tc1=0 tc2=0 tsp=0 devices=CPU0 CPU1 CPU2 CPU3 
$ ls /proc/acpi/
ac_adapter/   button/       processor/    video/        
battery/      event         thermal_zone/ wakeup 
$ acpi -V
Battery 0: Discharging, 52%, discharging at zero rate - will never fully discharge.
Battery 0: design capacity 4366 mAh, last full capacity 4131 mAh = 94%
Adapter 0: off-line
Thermal 0: ok, 51.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 127.0 degrees C
Cooling 0: Processor 0 of 10
Cooling 1: Processor 0 of 10
Cooling 2: Processor 0 of 10
Cooling 3: Processor 0 of 10

Offline

#2 2010-12-28 17:41:38

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: how log fan activity?

Install "acpitool", then "acpitool -f" should give you fan speed. But how to log that at regular intervals I do not know - perhaps a cron job of some sort?


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#3 2010-12-28 19:07:35

xavi117
Member
Registered: 2009-11-07
Posts: 12

Re: how log fan activity?

thanks for reply.
I didn't now about acpitool yet, but unfortunately it doesn't work for me.

$ acpitool -f
  Fan            : <not available>

with verbose:

acpitool -f -v
  Could not open directory : /proc/acpi/fan/
  function Do_Fan_Info() : make sure your kernel has ACPI fan support enabled.

i think i have no fan support in my kernel or my notebook doesn't support this.

Offline

#4 2010-12-28 19:50:53

ktemkin
Member
From: Binghamton
Registered: 2010-12-28
Posts: 6
Website

Re: how log fan activity?

Many fans are controlled by hardware, and either don't feature an exposed software interface or lack an implementation of the proper interface. This is especially likely on laptops; It seems like this is the case, as you lack /proc/acpi/fan/.

You can try, as root:

# modprobe fan 

which will manually instruct the kernel to load the fan module.

You can then get a list of supported fans:

$ ls /proc/acpi/fan -l
lagagnon wrote:

Install "acpitool", then "acpitool -f" should give you fan speed. But how to log that at regular intervals I do not know - perhaps a cron job of some sort?


Something as simple as a loop in bash should do, in case you get it working. A cronjob would be better for something every few minutes; it depends on your granularity. For something run every few seconds, it's better to have a daemon that stays resident in the process tables.

#!/bin/bash

lastfan=-1

#loop forever
while :
do
    #check the current value of the fan
    newfan=`acpitool -f`

    #if the fan value has changed
    if [ $lastfan != $newfan ]
    then
        now=`date`
        echo $now - Fan changed to $newfan >> /your/log/file
    fi

    #keep the last fan value current
    lastfan=$newfan

    #check every ten seconds
    sleep 10

done

Can't verify that works- written off the top of my head.

Cheers.

Last edited by ktemkin (2010-12-28 20:25:32)

Offline

#5 2010-12-29 02:04:39

Daniel_F
Member
From: Brazil
Registered: 2010-12-28
Posts: 69

Re: how log fan activity?

Try:

modprobe thinkpad_acpi

and then take a look inside /proc/acpi/ibm/

Offline

#6 2010-12-29 09:04:28

xavi117
Member
Registered: 2009-11-07
Posts: 12

Re: how log fan activity?

i tried

# modprobe fan

It creates /proc/acpi/fan/ directory, but it is empty and i can't list any fans:

$ ls /proc/acpi/fan -l
total 0

i tried also load thinkpad_acpi module but i got error:

$ sudo modprobe thinkpad_acpi
FATAL: Error inserting thinkpad_acpi (/lib/modules/2.6.36-ARCH/kernel/drivers/platform/x86/thinkpad_acpi.ko): No such device

My notebook is called IdeaPad (cheaper) not ThinkPad serie, so I' not sure if tools for thinkpads would work for me

Offline

Board footer

Powered by FluxBB