<<  >> (p.12)
    Author Topic: Banana Node- Unterstütze das Netzwerk!  (Read 65317 times)
    This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
    lassdas
    Legendary
    *
    Offline Offline

    Activity: 3680
    Merit: 1508


    View Profile WWW
    July 07, 2016, 11:33:15 PM
    Last edit: July 07, 2016, 11:54:30 PM by lassdas
     #221

    Das iss ja auch die falsche Adresse,
    versuchs mal mit http://192.168.2.62/   Wink


    Edit:
    Beim Thema RAM-Auslastung durch Mempool hab ich mich jetzt dazu entschieden,
    sie in das RAM-Script zu integrieren, nachvollziehbar, oder?  Smiley

    Dafür hab ich nur das memory.sh File so abgeändert,
    daß es eine zusätzliche Datenbank erstellt, ein zusätzliches Update der (neuen) Datenbank durchführt
    und dann die Grafik etwas modifziert.
    Das Ganze sieht dann folgendermaßen aus:
    Code:
    nano ~/memory.sh
    Code:
    #!/bin/bash
    # memory.sh - Memory usage stats

    rrdtool=/usr/bin/rrdtool
    db=/hdd/rrd/memory.rrd
    # mempool-ram db added
    mpdb=/hdd/rrd/mempool-ram.rrd
    img=/hdd/www/html/images

    if [ ! -e $db ]
    then
    $rrdtool create $db \
    --step 300 \
    DS:usage:GAUGE:600:0:U \
    RRA:AVERAGE:0.5:1:288 \
    RRA:AVERAGE:0.5:3:672 \
    RRA:AVERAGE:0.5:12:744 \
    RRA:AVERAGE:0.5:72:1480
    fi

    # mempool db creation added
    if [ ! -e $mpdb ]
    then
    $rrdtool create $mpdb \
    --step 300 \
    DS:mempoolmb:GAUGE:600:0:U \
    RRA:AVERAGE:0.5:1:288 \
    RRA:AVERAGE:0.5:3:672 \
    RRA:AVERAGE:0.5:12:744 \
    RRA:AVERAGE:0.5:72:1480
    fi

    $rrdtool update $db -t usage N:`free -b |grep cache:|cut -d":" -f2|awk '{print $1}'`
    # mempool db update added
    n=`/usr/local/bin/bitcoin-cli getmempoolinfo | jq '.usage'`
    $rrdtool update $mpdb -t mempoolmb N:"$n"

    # mempool added to graph
    for period in day week month year
    do
    $rrdtool graph $img/memory-$period.png -s -1$period \
    -t "Memory usage last $period" -z \
    -c "BACK#FFFFFF" -c "SHADEA#FFFFFF" -c "SHADEB#FFFFFF" \
    -c "MGRID#AAAAAA" -c "GRID#CCCCCC" -c "ARROW#333333" \
    -c "FONT#333333" -c "AXIS#333333" -c "FRAME#333333" \
            -h 134 -w 543 -l 0 -a PNG -v "RAM" \
    DEF:usage=$db:usage:AVERAGE \
    DEF:mempoolmb=$mpdb:mempoolmb:AVERAGE \
    VDEF:min=usage,MINIMUM \
    VDEF:max=usage,MAXIMUM \
    VDEF:avg=usage,AVERAGE \
    VDEF:lst=usage,LAST \
    VDEF:mpmin=mempoolmb,MINIMUM \
    VDEF:mpmax=mempoolmb,MAXIMUM \
    VDEF:mpavg=mempoolmb,AVERAGE \
    VDEF:mplst=mempoolmb,LAST \
    "COMMENT:      \l" \
    "COMMENT:        " \
    "COMMENT:         " \
    "COMMENT:Minimum    " \
    "COMMENT:Maximum    " \
    "COMMENT:Average     " \
    "COMMENT:Last    \l" \
    "COMMENT:   " \
    "AREA:usage#92CF00:Usage      " \
    "LINE1:usage#3F5A00" \
    "GPRINT:min:%5.1lf %sB   " \
    "GPRINT:max:%5.1lf %sB   " \
    "GPRINT:avg:%5.1lf %sB   " \
    "GPRINT:lst:%5.1lf %sB   \l" \
    "COMMENT:   " \
    "AREA:mempoolmb#8AD3F1:Mempool    " \
    "LINE1:mempoolmb#49BEEF" \
    "GPRINT:mpmin:%5.1lf %sB   " \
    "GPRINT:mpmax:%5.1lf %sB   " \
    "GPRINT:mpavg:%5.1lf %sB   " \
    "GPRINT:mplst:%5.1lf %sB   \l" >dev/null
    done
    speichern, fertich.
    Der entsprechende cronjob läuft ja bereits.
Page 11
Viewing Page: 12