[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fan control ?



* John K. Parejko [090916 15:12 -0400]
> Hello,
> 
> I just signed up to debian-powerpc, and noticed Niels S. Eliasen's
> question from September 7th. I was able to get some power management
> and sensors working on my g4 powerbook (12" 1.33GHz PowerBook6,4).
> 
> It is now serving as a webserver, NAT firewall, and wireless access
> point. (hostapd works with the nl80211 drivers in master mode, but
> required updating to kernel 2.6.30 from backports and hostapd 0.6.9
> from testing.)
> 
> Try the following to get a reading of the temperature and fan speed
> (I've included the output on my machine as an example):
> 
> $ cat /sys/devices/temperatures/*temp*
> 49
> 61
> $ cat /sys/devices/temperatures/*fan*
> 64 (4770 rpm)
> 64 (0 rpm)
> 64

To check my sensors i ran the attached script.

Elimar


-- 
  Learned men are the cisterns of knowledge, 
  not the fountainheads ;-)
#! /bin/sh

#if  LC_ALL=C cat /sys/devices/temperatures/cpu_fan_speed = 82 ;
#   then FANSPEEDCPU=0
#else
    FANSPEEDCPU=`LC_ALL=C cat /sys/devices/temperatures/sensor1_fan_speed | sed -e s#rpm#U\/min#`
#fi

#if [ `LC_ALL=C cat /sys/devices/temperatures/gpu_fan_speed` = 82 ]
#   then FANSPEEDGPU=0
#else
#    FANSPEEDGPU=`LC_ALL=C cat /sys/devices/temperatures/gpu_fan_speed`
#fi

dialog --title " Temperatures of my AlBook G4 " \
       --backtitle " `cat /proc/version` at `hostname -f` " \
       --infobox \
"  cpu fan speed:       $FANSPEEDCPU \n \
 cpu limit:           `LC_ALL=C cat /sys/devices/temperatures/sensor1_limit` °C\n \
 cpu temperature:     `LC_ALL=C cat /sys/devices/temperatures/sensor1_temperature` °C\n \
 gpu limit;           `LC_ALL=C cat /sys/devices/temperatures/sensor2_limit` °C \n \
 gpu temperature:     `LC_ALL=C cat /sys/devices/temperatures/sensor2_temperature` °C\n \
 limit adjust:        `LC_ALL=C cat /sys/devices/temperatures/limit_adjust` \n \
 specified fan speed: `LC_ALL=C cat /sys/devices/temperatures/specified_fan_speed` \n \
 hdd temp:            `LC_ALL=C sudo hddtemp /dev/hda | awk '{print $3}' | sed -e s/°C//` °C\n
  cpu clock:           `LC_ALL=C cat /proc/cpuinfo | grep clock| awk '{print $3}i' | sed -e s/000/\ /g`" 12 45

# vim:tw=120

Reply to: