#!/bin/sh #------------------------------------------------------------------------------ # opt/files/srv/www/admin/cv860a.cgi 3.5.0 # # Creation: gdw # Last Update: $Id$ #------------------------------------------------------------------------------ . /srv/www/include/cgi-helper # Security check_rights "embedded" "view" . /var/run/embedded.conf volt1=`sed 's/\([0-9]\{3\}\)$/.\1/' /sys/class/hwmon/hwmon0/device/in0_input` volt2=`sed 's/\([0-9]\{3\}\)$/.\1/' /sys/class/hwmon/hwmon0/device/in1_input` volt3=`sed 's/\([0-9]\{3\}\)$/.\1/' /sys/class/hwmon/hwmon0/device/in2_input` volt4=`sed 's/\([0-9]\{3\}\)$/.\1/' /sys/class/hwmon/hwmon0/device/in3_input` volt5=`sed 's/\([0-9]\{3\}\)$/.\1/' /sys/class/hwmon/hwmon0/device/in4_input` temp1=`sed 's/\([0-9]\)[0-9]\{2\}$/.\1/' /sys/class/hwmon/hwmon0/device/temp1_input` temp2=`sed 's/\([0-9]\)[0-9]\{2\}$/.\1/' /sys/class/hwmon/hwmon0/device/temp2_input` freq=`sed 's/\([0-9]\{3\}\)$//' /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq` freq=`expr $freq + 1` show_html_header "cv860a" show_tab_header "Temperaturen" no cat < Sensor Temp CPU $temp1 °C PCB $temp2 °C EOF show_tab_footer show_tab_header "Spannungen" no cat < Sensor Spannung CPU Core $volt1 V 2.5V $volt2 V I/O $volt3 V 5V $volt4 V 12V $volt5 V EOF show_tab_footer if [ -n "`lsmod | grep longhaul`" ] then show_tab_header "Prozessor" no cat < Taktfrequenz $freq MHz EOF show_tab_footer fi show_html_footer