On Friday 26 Dec 2003 12:05, Reinhard Brandst�dter wrote:
> Reinhard Brandst�dter wrote:
> > I also found a script to check these values on the console but I
> > can't find the link where I got it from right now.
>
> Here it is:
> http://www.xs4all.nl/~thospel/ASIS/bin/psensors

I couldn't get that to work: "Can't locate Config/General.pm in @INC".

Here's my simple bash & bc script:

########################################################################
#!/bin/bash
#/usr/local/bin/sensor

# Check for 2.6 kernel
PATCHLEVEL=$(grep 'PATCHLEVEL =' /usr/src/linux/Makefile | cut -d= -f2 | 
cut -d' ' -f2)
if [ ${PATCHLEVEL} -lt 6 ]; then
        echo "This script is for 2.6 kernels, use 'sensors'."
        exit 1
fi

# Find your own device - mine is 0-0290
cd /sys/bus/i2c/devices/0-0290
echo "CURRENT SENSOR VALUES ($(cat name))"
# This is the "Factor" (100th of what gkrellm says)----�
echo " CPU temp: $(echo "scale=1; $(cat temp_input2)*17.22/10000" | 
bc)�C"
echo " Sys temp: $(echo "scale=1; $(cat temp_input1)/1000" | bc)�C"
echo
echo " CPU fan : $(cat fan_input1) RPM"
echo " Sys fan : $(cat fan_input2) RPM"
echo
echo " Vcore   :  $(echo "scale=2; $(cat in_input0)/1000" | bc) V"
echo " DDR Vtt :  $(echo "scale=2; $(cat in_input1)/1000" | bc) V"
echo " +3.3V   :  $(echo "scale=2; $(cat in_input2)/1000" | bc) V"
# here's that "Factor" again, followed by the "Offset"--�
echo " +5V     :  $(echo "scale=2; $(cat in_input3)*1.33/1000+1" | bc) 
V"
echo " +12V    : $(echo "scale=2; $(cat in_input4)/1000*4" | bc) V"
echo " +5Vsb   :  $(echo "scale=2; $(cat in_input7)/1000*1.68" | bc) V"
echo
########################################################################

Peter
-- 
======================================================================
Gentoo Linux:   Portage 2.0.49-r18 (default-x86-1.4, gcc-3.2.3, 
glibc-2.3.2-r3, 2.6.0-gentoo-w4l)       i686 AMD Athlon(tm) XP 3200+
======================================================================


--
[EMAIL PROTECTED] mailing list

Reply via email to