#!/bin/sh #------------------------------------------------------------------------------ # opt/files/srv/www/admin/p640.cgi __FLI4LVER__ # # Creation: gdw # Last Update: $Id$ #------------------------------------------------------------------------------ . /srv/www/include/cgi-helper # Security check_rights "embedded" "view" . /var/run/embedded.conf show_html_header "WinNet P640" VCORE1=`cat /sys/class/hwmon/hwmon0/device/in0_input | sed 's/^\([0-9]\)\([0-9]\)/\1.\2/'` V33=`cat /sys/class/hwmon/hwmon0/device/in2_input | sed 's/^\([0-9]\)\([0-9]\)/\1.\2/'` V5=`cat /sys/class/hwmon/hwmon0/device/in3_input` V5=`expr $V5 \* 168 | sed 's/^\([0-9]\)\([0-9]\{3\}\).*/\1.\2/'` V12=`cat /sys/class/hwmon/hwmon0/device/in4_input` V12=`expr $V12 \* 380 | sed 's/^\([0-9]\{2\}\)\([0-9]\{2\}\).*/\1.\2/'` VCC=`cat /sys/class/hwmon/hwmon0/device/in7_input` VCC=`expr $VCC \* 168 | sed 's/^\([0-9]\)\([0-9]\{3\}\).*/\1.\2/'` VBAT=`cat /sys/class/hwmon/hwmon0/device/in8_input | sed 's/^\([0-9]\)\([0-9]\)/\1.\2/'` TCPU=`cat /sys/class/hwmon/hwmon0/device/temp1_input | sed 's/^\([0-9]\+\)\([0-9]\{3\}\)/\1.\2/'` TBOARD=`cat /sys/class/hwmon/hwmon0/device/temp2_input | sed 's/^\([0-9]\+\)\([0-9]\{3\}\)/\1.\2/'` show_tab_header "Temperatur" no cat < Sensor Temp CPU $TCPU °C PCB $TBOARD °C EOF show_tab_footer show_tab_header "Spannung" no cat < Sensor Spannung VCore 1 $VCORE1 V +3,3 $V33 V +5 $V5 V +12V $V12 V 5VSB $VCC V VBat $VBAT V EOF show_tab_footer if [ -n "`lsmod | grep longhaul`" ] then freq=`sed 's/\([0-9]\{3\}\)$//' /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq` freq=`expr $freq + 3` show_tab_header "Prozessor" no cat < Taktfrequenz $freq MHz EOF show_tab_footer fi show_html_footer