Changeset 5732


Ignorieren:
Zeitstempel:
07.09.2010 14:50:49 (vor 7 Jahren)
Autor:
cuma
Nachricht:

rrdstats/digitemp:

  • option to read sensors multiple times (usefully for FB 7xxx)
  • added line-break till we have a better solution
Ort:
trunk/make/rrdstats/files/root
Dateien:
4 bearbeitet

Legende:

Unverändert
Hinzugefügt
Entfernt
  • trunk/make/rrdstats/files/root/etc/default.rrdstats/rrdstats

    r5318 r5732  
    2424            RRA:AVERAGE:0.5:6:672 \ 
    2525            RRA:AVERAGE:0.5:24:732 \ 
    26             RRA:AVERAGE:0.5:144:1460     
     26            RRA:AVERAGE:0.5:144:1460 
    2727    fi 
    2828    cpudata=$(grep '^cpu ' /proc/stat 2>/dev/null | awk '{print "N:"$2":"$3":"$4":"$6+$7":"$5;}') 
     
    8282collect_diskio() { 
    8383    [ $# -eq 0 ] && return 
    84     case $1 in  
     84    case $1 in 
    8585        1) 
    8686            DISK=$RRDSTATS_DISK_DEV1 
     
    161161collect_net() { 
    162162    [ $# -eq 0 ] && return 
    163     case $1 in  
     163    case $1 in 
    164164        1) 
    165165            IF=$RRDSTATS_INTERFACE1 
     
    215215            RRA:MIN:0.5:144:1460 RRA:AVERAGE:0.5:144:1460 RRA:MAX:0.5:144:1460 
    216216    fi 
    217     onedata=$($_NICE digitemp $rs_param -t$1 -q -o%$_SENSOR_UOM -c$_SENSOR_CNF) 
    218     oneretv=$? 
     217 
     218    onedata="" 
     219    onetrys="$RRDSTATS_DIGITEMP_RETRIES" 
     220    while [ -z "$onedata" -a "$onetrys" -ge 0 ]; do 
     221        let onetrys-- 
     222        onedata="$($_NICE digitemp $rs_param -t$1 -q -o%$_SENSOR_UOM -c$_SENSOR_CNF)" 
     223        oneretv=$? 
     224        [ "$onedate" = "$_SENSOR_ERR" -a "$RRDSTATS_DIGITEMP_RETRY85" = "yes" -a "$onetrys" -ge 0 ] && onedata="" 
     225    done 
     226 
    219227    if [ -n "$onedata" -a "$oneretv" -eq 0 ]; then 
    220228        echo "$_CURRENT;$onedata;" >> $RRDSTATS_RRDDATA/one_00-$2_$_SENSOR_UOM.cvs 
     
    279287    [ $# -eq 0 ] && exit 
    280288    _SLEEPER=$(( $_NEXTRUN-$(date +%s) )) 
    281     [ $_SLEEPER -gt 0 ] && sleep $_SLEEPER  
     289    [ $_SLEEPER -gt 0 ] && sleep $_SLEEPER 
    282290done 
    283291 
  • trunk/make/rrdstats/files/root/etc/default.rrdstats/rrdstats.cfg

    r5154 r5732  
    6767export RRDSTATS_DIGITEMPRS='' 
    6868export RRDSTATS_DIGITEMP85='no' 
     69export RRDSTATS_DIGITEMP_RETRIES='0' 
     70export RRDSTATS_DIGITEMP_RETRY85='no' 
    6971export RRDSTATS_DIGITEMP_A='no' 
    7072export RRDSTATS_DIGITEMP_HTTP='no' 
  • trunk/make/rrdstats/files/root/usr/lib/cgi-bin/rrdstats.cgi

    r5673 r5732  
    3232check "$RRDSTATS_DIGITEMP1W" yes:digitemp1w 
    3333check "$RRDSTATS_DIGITEMP_C" yes:digitemp_c "*":digitemp_f 
     34check "$RRDSTATS_DIGITEMP_RETRY85" yes:digitemp_retry85 
    3435check "$RRDSTATS_DIGITEMP85" yes:digitemp85 
    3536check "$RRDSTATS_DIGITEMP_A" yes:digitemp_a 
     
    356357 
    357358<p> 
     359$(lang de:"Anzahl Wiederholungen, falls ein Sensor keinen Wert zur&uuml;ckliefert" en:"Count of retries, if a sensorc does not return a value"): 
     360<input type="text" name="digitemp_retries" size="2" maxlength="3" value="$(html "$RRDSTATS_DIGITEMP_RETRIES")"> 
     361</p> 
     362 
     363<p> 
     364<input type="hidden" name="digitemp_retry85" value="no"> 
     365<input id="d5" type="checkbox" name="digitemp_retry85" value="yes"$digitemp_retry85_chk> 
     366<label for="d5">$(lang de:"Wiederhole auch bei 85,000000&deg;C (Fehler und Werte)" en:"Retry also with 185.000000&deg;F (errors and values)")</label> 
     367</p> 
     368 
     369<p> 
    358370<input type="button" value="DigiTemp initialisieren" onclick="if (confirm('$(lang de:"Fortfahren?" en:"Proceed?")')==true) window.open('$(href extra rrdstats dt-init)','Initialisieren_von_DigiTemp','menubar=no,width=$INIT_WINDOW_WIDTH,height=600,toolbar=no,resizable=yes,scrollbars=yes');" /> &nbsp;&nbsp; 
    359371<br><font size="-2">$(lang de:"Vor dem ersten Aktivieren oder nach Ver&auml;nderungen der Ger&auml;te ausf&uuml;hren" en:"Run this before the first start of if you change your devices")</font> 
  • trunk/make/rrdstats/files/root/usr/lib/cgi-bin/rrdstats/main.cgi

    r5723 r5732  
    492492            heading="$GROUP_PERIOD" 
    493493        fi 
    494         echo "<center><font size=+1><b>$heading stats</b></font></center>" 
     494        echo "<center><font size=+1><br><b>$heading stats</b></font></center>" 
    495495 
    496496        if [ $(echo "$graph" | sed 's/^tt./yes/') = yes -a "$RRDSTATS_THOMSONADV" = yes ]; then 
     
    518518        set_lazy "$RRDSTATS_NOTLAZYM" 
    519519        set_period "$RRDSTATS_PERIODMAIN" 
    520         echo "<center><font size=+1><b>Stats for last $periodnn</b></font></center>" 
     520        echo "<center><font size=+1><br><b>Stats for last $periodnn</b></font></center>" 
    521521        case $RRD_DISPLAY_TYPE in 
    522522            rrddt) 
Hinweis: Hilfe zur Verwendung der Changeset-Ansicht finden Sie unter TracChangeset.