bz home

RRD

/opt/var $ mkdir rrdtool /opt/var $ cd rrdtool/ /opt/var/rrdtool $ mkdir rrd /opt/var/rrdtool $ mkdir scripts /opt/var/rrdtool $ mkdir www /opt/var/rrdtool $ chmod 700 rrd scripts /opt/var/rrdtool $ chmod 750 www /opt/var/rrdtool $

rrdtool create rrd/TRAF.rrd --step 60 DS:inTOTAL:COUNTER:120:U:U DS:outTOTAL:COUNTER:120:U:U RRA:AVERAGE:0.5:1:6000 RRA:AVERAGE:0.5:5:6000 RRA:AVERAGE:0.5:30:7000 RRA:AVERAGE:0.5:120:7750 RRA:AVERAGE:0.5:1440:7970 RRA:MAX:0.5:1:6000 RRA:MAX:0.5:5:6000 RRA:MAX:0.5:30:7000 RRA:MAX:0.5:120:7750 RRA:MAX:0.5:1440:7970 RRA:MIN:0.5:1:6000 RRA:MIN:0.5:5:6000 RRA:MIN:0.5:30:7000 RRA:MIN:0.5:120:7750 RRA:MIN:0.5:1440:7970 RRA:LAST:0.5:1:6000 RRA:LAST:0.5:5:6000 RRA:LAST:0.5:30:7000 RRA:LAST:0.5:120:7750 RRA:LAST:0.5:1440:7970

ifconfig egiga0 | grep 'RX bytes' | awk -F ': *| +' '{print $4}' ifconfig egiga0 | grep 'TX bytes' | awk -F ': *| +' '{print $4}'

#!/bin/sh #

RRDPREFIX=/usr/NET/rrd WWWPREFIX=/usr/NET/www_pub RRDCMD=./usr/local/bin/rrdtool.

$RRDCMD graph $WWWPREFIX/HTTP_6h.png .width 760 .height 200 .imgformat PNG .start -6h .end now .slope-mode .font-render-mode light .font DEFAULT:8:Tahoma .font TITLE:7:Arial .font AXIS:6:Arial .font UNIT:7:.Courier New. .font LEGEND:6:.Courier New. .font WATERMARK:6:Arial .color BACK#2F2F2F .color CANVAS#003333 .color SHADEA#CCCCCC .color SHADEB#CCCCCC .color FONT#FFFFFF .color AXIS#FFFFFF .color ARROW#FF0000 .color GRID#CCCCCC .color MGRID#CCCCCC .vertical-label .Скорость бит/секунду. .title .Трафик HTTP сервера за последние 6 часов. DEF:inoctetsHTTP=$RRDPREFIX/TOTAL-HTTP-DNS-PROXY.rrd:inHTTP:AVERAGE DEF:outoctetsHTTP=$RRDPREFIX/TOTAL-HTTP-DNS-PROXY.rrd:outHTTP:AVERAGE .CDEF:inbitsHTTP=inoctetsHTTP,8,*. .CDEF:outbitsHTTP=outoctetsHTTP,8,*. COMMENT:. .n AREA:outbitsHTTP#FF0000:.HTTP OUT . GPRINT:outbitsHTTP:LAST:.Последнее %6.2lf %sbps . GPRINT:outbitsHTTP:MAX:.Максимальное %6.2lf %sbps . GPRINT:outbitsHTTP:AVERAGE:.Среднее %6.2lf %sbps . GPRINT:outbitsHTTP:MIN:.Минимальное %6.2lf %sbps .c COMMENT:n AREA:inbitsHTTP#FFFF00:.HTTP IN . GPRINT:inbitsHTTP:LAST:.Последнее %6.2lf %sbps . GPRINT:inbitsHTTP:MAX:.Максимальное %6.2lf %sbps . GPRINT:inbitsHTTP:AVERAGE:.Среднее %6.2lf %sbps . GPRINT:inbitsHTTP:MIN:.Минимальное %6.2lf %sbps .c COMMENT:. .n COMMENT:.Charts created by Daemony .:. live.daemony.org.r COMMENT:n