This is a discussion on [rrd-users] Noobe needs some adviceing (on rrd and FreeBSD) within the RRD Users forums, part of the Networking and Network Related category; This is a multi-part message in MIME format. --===============1718596001== Content-Transfer-Encoding: binary Content-Type: multipart/alternative; boundary="...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
This is a multi-part message in MIME format.
--===============1718596001== Content-Transfer-Encoding: binary Content-Type: multipart/alternative; boundary="_----------=_12088748616609116" This is a multi-part message in MIME format. --_----------=_12088748616609116 MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="windows-1251" Hello all! Im a noobe at bouth BSD and RRD, hope some one will help me understand and find, a solution to my Errors. Pardon me for any missprints or misstakes. SITUATION: I installed rrdtool-1.2.27 from ports as described in readme`s on my FreeBSD 6.0 server. It all was made ok with no errors. Then i did some reading on man and googling for solutions (without need to mess with Mysql or Apache). Did create sh file #!/bin/sh rrdtool create /usr/local/rrdtool-1.2.27/db/network_usage.rrd* --start now --step 300\ DS:mail_input:COUNTER:600:U:U \ DS:mail_output:COUNTER:600:U:U \ DS:html_traf:COUNTER:600:U:U \ DS:shtml_traf:COUNTER:600:U:U \ DS:ftp_traf:COUNTER:600:U:U \ DS:all:COUNTER:600:U:U \ RRA:AVERAGE:0.5:1:600 \ RRA:AVERAGE:0.5:6:700 \ RRA:AVERAGE:0.5:24:775 \ RRA:AVERAGE:0.5:288:797 \ RRA:MAX:0.5:1:600 \ RRA:MAX:0.5:6:700 \ RRA:MAX:0.5:24:775 \ RRA:MAX:0.5:288:797 \ It creates fine. Next i try to update existing data base with counter data from ipfw manualy cheched ipfw rules and counders do count ok. #!/bin/sh mail_input=`ipfw show 80 | awk '{print $3}'` mail_output=`ipfw show 81 | awk '{print $3}'` http_traf=`ipfw show 82 | awk '{print $3}'` shttp_traf=`ipfw show 83 | awk '{print $3}'` ftp_traf=`ipfw show 84 | awk '{print $3}'` all=`ipfw show 85 | awk '{print $3}'` rrdtool update /usr/local/rrdtool-1.2.27/db/network_usage.rrd \ *N:$mail_input:$mail_output:$http_traf:$shttp_traf :$ftp_traf:$all *Here i stumbled on first error. ERROR: expected timestamp not found in data source from N:2991935:6312:44368311:5850271:1302:318461263: not found It says it doesnt know what N is! Mkay, i write another line dates=`date +%s | awk '{print $1}'` and add $dates instead of N. Ok no Errors. Next i try to graph it all. With following sh file #!/bin/sh WWWPREFIX=/home/alp/hosting/!default/rrdtool/images RRDPREFIX=/usr/local/rrdtool-1.2.27/db rrdtool graph $WWWPREFIX/network.png \ *--width 500 --height 500 --imgformat PNG \ *--start -43200 \ *--title "Bandwidth graph for last 12 hours" --rigid --color BACK#FAFAFA \ *--vertical-label Kbit/sec \ *DEF:ifino=$RRDPREFIX/network_usage.rrd:mail_input:AVERAGE \ *DEF:ifouto=$RRDPREFIX/network_usage.rrd:mail_output:AVERAGE \ *DEF:html_traf=$RRDPREFIX/network_usage.rrd:html_traf:AVERAGE \ *DEF:shtml_traf=$RRDPREFIX/network_usage.rrd:shtml_traf:AVERAGE \ *DEF:ftp_traf=$RRDPREFIX/network_usage.rrd:ftp_traf:AVERAGE \ *DEF:all=$RRDPREFIX/network_usage.rrd:all:AVERAGE \ *CDEF:smtp=ifino,128, \ *CDEF:pop3=ifouto,128, \ *CDEF:html=html_traf,128, \ *CDEF:shtml=shtml_traf,128, \ *CDEF:ftp=ftp_traf,128, \ *CDEF:all1=all,128, \ *VDEF:sumsmtp=ifino,TOTAL \ *VDEF:sumpop3=ifouto,TOTAL \ *VDEF:sumhtml=html_traf,TOTAL \ *VDEF:sumshtml=shtml_traf,TOTAL \ *VDEF:sumftp=ftp_traf,TOTAL \ *VDEF:sumall=all,TOTAL \ *VDEF:maxsmtp=smtp,MAXIMUM \ *VDEF:maxpop3=pop3,MAXIMUM \ *VDEF:maxhtml=html,MAXIMUM \ *VDEF:maxshtml=shtml,MAXIMUM \ *VDEF:maxftp=ftp,MAXIMUM \ *VDEF:maxall=all1,MAXIMUM \ *VDEF:avgsmtp=smtp,AVARAGE \ *VDEF:avgpop3=pop3,AVERAGE \ *VDEF:avghtml=html,AVERAGE \ *VDEF:avgshtml=shtml,AVERAGE \ *VDEF:avgftp=ftp,AVERAGE \ *VDEF:avgall=all1,AVERAGE \ *AREA:all1#CCCCCC:"ALL" \ *GPRINT:maxall:"Max=%lf%s" \ *GPRINT:avgall:"Avg=%lf%s" \ *GPRINT:sumall:"Sum=%lf %sbytes\l" \ *LINE1:html#FF6600:"HTML" \ *GPRINT:maxhtml:"Max=%lf%s" \ *GPRINT:avghtml:"Avg=%lf%s" \ *GPRINT:sumhtml:"Sum=%lf %sbytes\l" \ *LINE1:shtml#00FF00:"SHTML" \ *GPRINT:maxshtml:"Max=%lf%s" \ *GPRINT:avgshtml:"Avg=%lf%s" \ *GPRINT:sumshtml:"Sum=%lf %sbytes\1" \ *LINE1:pop3#0000FF:"POP3" \ *GPRINT:maxpop3:"Max=%lf%s" \ *GPRINT:avgpop3:"Avg=%lf%s"***** \ * GPRINT:sumpop3:"Sum=%lf %sbytes\l" \ *LINE1:smtp#FF0000:"SMTP" \ *GPRINT:maxsmtp:"Max=%lf%s" \ *GPRINT:avgsmtp:"Avg=%lf%s" \ *GPRINT:sumsmtp:"Sum=%lf %sbytes\l" \ *LINE1:ftp#FF00FF:"FTP" \ *GPRINT:maxftp:"Max=%lf%s" \ *GPRINT:avgftp:"Avg=%lf%s" \ *GPRINT:sumftp:"Sum=%lf %sbytes\1" \ * Another one: ERROR: Could not make sense out of ' ' GPRINT:avgpop3:Avg=%lf%s: not found GPRINT:sumftp:Sum=%lf %sbytes\1: not found* Doooh, i made it more simple #!/bin/sh WWWPREFIX=/home/alp/hosting/!default/rrdtool/images RRDPREFIX=/usr/local/rrdtool-1.2.27/db rrdtool graph $WWWPREFIX/lasttest.png --start -1d --end now --title "ALL hail TOBI!" DEF:htmkets=$RRDPREFIX/network_usage.rrd:html_traf:AVERAGE* \ DEF:shtmkets=$RRDPREFIX/network_usage.rrd:all:AVERAGE "CDEF:htm=htmkets,8,*" "CDEF:sht=shtmkets,8,*" \ AREA:htm#00FF00:"Totall" LINE:sht#0000FF:"LAN" Next i did some shaman dance with "create" options of first file (--start 12088556117 only, then --step 300 or -s 300 or without step or any options) And all lead to one peak on graph and then nothing. Ok i think that my trafic is low atm so i dont mind the cap and crontab -e */5 * * * * sh file wich launches two lines (one refresh sh and other graph sh). Picture updates and lonly peak moves left (so i think graphing works fine). But wtf! trafshow shows traffic coming and going, counters count and i get no graph... That makes my brain demage... I tryed to consult with people who recomend me rrdtool but their configs didnt work allso. With hope of a helping hand here i write this mail. Thank you for reading it. --_----------=_12088748616609116 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/html; charset="windows-1251" <html> <body> <div style='font: 12pt sans-serif;'> Hello all! <br />Im a noobe at bouth BSD and RRD, hope some one will help me understand and find, a solution to my Errors. Pardon me for any missprints or misstakes. <br /> <br />SITUATION: <br />I installed rrdtool-1.2.27 from ports as described in readme`s on my FreeBSD 6.0 server. <br />It all was made ok with no errors. <br /> <br />Then i did some reading on man and googling for solutions (without need to mess with Mysql or Apache). <br /> <br />Did create sh file <br /> <br />#!/bin/sh <br /> <br />rrdtool create /usr/local/rrdtool-1.2.27/db/network_usage.rrd* --start now --step 300\ <br />DS:mail_input:COUNTER:600:U:U \ <br />DS:mail_output:COUNTER:600:U:U \ <br />DS:html_traf:COUNTER:600:U:U \ <br />DS:shtml_traf:COUNTER:600:U:U \ <br />DS:ftp_traf:COUNTER:600:U:U \ <br />DS:all:COUNTER:600:U:U \ <br />RRA:AVERAGE:0.5:1:600 \ <br />RRA:AVERAGE:0.5:6:700 \ <br />RRA:AVERAGE:0.5:24:775 \ <br />RRA:AVERAGE:0.5:288:797 \ <br />RRA:MAX:0.5:1:600 \ <br />RRA:MAX:0.5:6:700 \ <br />RRA:MAX:0.5:24:775 \ <br />RRA:MAX:0.5:288:797 \ <br /> <br />It creates fine. <br /> <br />Next i try to update existing data base with counter data from ipfw <br />manualy cheched ipfw rules and counders do count ok. <br /> <br />#!/bin/sh <br />mail_input=`ipfw show 80 | awk '{print $3}'` <br />mail_output=`ipfw show 81 | awk '{print $3}'` <br />http_traf=`ipfw show 82 | awk '{print $3}'` <br />shttp_traf=`ipfw show 83 | awk '{print $3}'` <br />ftp_traf=`ipfw show 84 | awk '{print $3}'` <br />all=`ipfw show 85 | awk '{print $3}'` <br /> <br />rrdtool update /usr/local/rrdtool-1.2.27/db/network_usage.rrd \ <br />*N:$mail_input:$mail_output:$http_traf:$shttp_tra f:$ftp_traf:$all <br /> <br />*Here i stumbled on first error. <br /> <br />ERROR: expected timestamp not found in data source from <br />N:2991935:6312:44368311:5850271:1302:318461263: not found <br /> <br />It says it doesnt know what N is! Mkay, i write another line dates=`date +%s | awk '{print $1}'` <br />and add $dates instead of N. <br />Ok no Errors. <br /> <br />Next i try to graph it all. With following sh file <br /> <br />#!/bin/sh <br />WWWPREFIX=/home/alp/hosting/!default/rrdtool/images <br />RRDPREFIX=/usr/local/rrdtool-1.2.27/db <br /> <br />rrdtool graph $WWWPREFIX/network.png \ <br />*--width 500 --height 500 --imgformat PNG \ <br />*--start -43200 \ <br />*--title "Bandwidth graph for last 12 hours" --rigid --color BACK#FAFAFA \ <br />*--vertical-label Kbit/sec \ <br />*DEF:ifino=$RRDPREFIX/network_usage.rrd:mail_input:AVERAGE \ <br />*DEF:ifouto=$RRDPREFIX/network_usage.rrd:mail_output:AVERAGE \ <br />*DEF:html_traf=$RRDPREFIX/network_usage.rrd:html_traf:AVERAGE \ <br />*DEF:shtml_traf=$RRDPREFIX/network_usage.rrd:shtml_traf:AVERAGE \ <br />*DEF:ftp_traf=$RRDPREFIX/network_usage.rrd:ftp_traf:AVERAGE \ <br />*DEF:all=$RRDPREFIX/network_usage.rrd:all:AVERAGE \ <br />*CDEF:smtp=ifino,128, \ <br />*CDEF:pop3=ifouto,128, \ <br />*CDEF:html=html_traf,128, \ <br />*CDEF:shtml=shtml_traf,128, \ <br />*CDEF:ftp=ftp_traf,128, \ <br />*CDEF:all1=all,128, \ <br />*VDEF:sumsmtp=ifino,TOTAL \ <br />*VDEF:sumpop3=ifouto,TOTAL \ <br />*VDEF:sumhtml=html_traf,TOTAL \ <br />*VDEF:sumshtml=shtml_traf,TOTAL \ <br />*VDEF:sumftp=ftp_traf,TOTAL \ <br />*VDEF:sumall=all,TOTAL \ <br />*VDEF:maxsmtp=smtp,MAXIMUM \ <br />*VDEF:maxpop3=pop3,MAXIMUM \ <br />*VDEF:maxhtml=html,MAXIMUM \ <br />*VDEF:maxshtml=shtml,MAXIMUM \ <br />*VDEF:maxftp=ftp,MAXIMUM \ <br />*VDEF:maxall=all1,MAXIMUM \ <br />*VDEF:avgsmtp=smtp,AVARAGE \ <br />*VDEF:avgpop3=pop3,AVERAGE \ <br />*VDEF:avghtml=html,AVERAGE \ <br />*VDEF:avgshtml=shtml,AVERAGE \ <br />*VDEF:avgftp=ftp,AVERAGE \ <br />*VDEF:avgall=all1,AVERAGE \ <br />*AREA:all1#CCCCCC:"ALL" \ <br />*GPRINT:maxall:"Max=%lf%s" \ <br />*GPRINT:avgall:"Avg=%lf%s" \ <br />*GPRINT:sumall:"Sum=%lf %sbytes\l" \ <br />*LINE1:html#FF6600:"HTML" \ <br />*GPRINT:maxhtml:"Max=%lf%s" \ <br />*GPRINT:avghtml:"Avg=%lf%s" \ <br />*GPRINT:sumhtml:"Sum=%lf %sbytes\l" \ <br />*LINE1:shtml#00FF00:"SHTML" \ <br />*GPRINT:maxshtml:"Max=%lf%s" \ <br />*GPRINT:avgshtml:"Avg=%lf%s" \ <br />*GPRINT:sumshtml:"Sum=%lf %sbytes\1" \ <br />*LINE1:pop3#0000FF:"POP3" \ <br />*GPRINT:maxpop3:"Max=%lf%s" \ <br />*GPRINT:avgpop3:"Avg=%lf%s"***** \ <br />* GPRINT:sumpop3:"Sum=%lf %sbytes\l" \ <br />*LINE1:smtp#FF0000:"SMTP" \ <br />*GPRINT:maxsmtp:"Max=%lf%s" \ <br />*GPRINT:avgsmtp:"Avg=%lf%s" \ <br />*GPRINT:sumsmtp:"Sum=%lf %sbytes\l" \ <br />*LINE1:ftp#FF00FF:"FTP" \ <br />*GPRINT:maxftp:"Max=%lf%s" \ <br />*GPRINT:avgftp:"Avg=%lf%s" \ <br />*GPRINT:sumftp:"Sum=%lf %sbytes\1" \ <br />* <br />Another one: <br />ERROR: Could not make sense out of ' ' <br />GPRINT:avgpop3:Avg=%lf%s: not found <br />GPRINT:sumftp:Sum=%lf %sbytes\1: not found* <br /> <br />Doooh, i made it more simple <br /> <br />#!/bin/sh <br />WWWPREFIX=/home/alp/hosting/!default/rrdtool/images <br />RRDPREFIX=/usr/local/rrdtool-1.2.27/db <br /> <br />rrdtool graph $WWWPREFIX/lasttest.png --start -1d --end now --title "ALL hail TOBI!" DEF:htmkets=$RRDPREFIX/network_usage.rrd:html_traf:AVERAGE* \ <br />DEF:shtmkets=$RRDPREFIX/network_usage.rrd:all:AVERAGE "CDEF:htm=htmkets,8,*" "CDEF:sht=shtmkets,8,*" \ <br />AREA:htm#00FF00:"Totall" LINE:sht#0000FF:"LAN" <br /> <br />Next i did some shaman dance with "create" options of first file (--start 12088556117 only, then --step 300 or -s 300 or without step or any options) <br /> <br />And all lead to one peak on graph and then nothing. <br /> <br />Ok i think that my trafic is low atm so i dont mind the cap and crontab -e */5 * * * * sh file wich launches two lines (one refresh sh and other graph sh). <br />Picture updates and lonly peak moves left (so i think graphing works fine). <br /> <br />But wtf! trafshow shows traffic coming and going, counters count and i get no graph... <br /> <br />That makes my brain demage... <br /> <br />I tryed to consult with people who recomend me rrdtool but their configs didnt work allso. <br />With hope of a helping hand here i write this mail. Thank you for reading it. <br /> <br /> </div></body> </html> --_----------=_12088748616609116-- --===============1718596001== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users --===============1718596001==-- |
![]() |
| Thread Tools | |
| Display Modes | |
|
|