[rrd-users] Noobe needs some adviceing (on rrd and FreeBSD)

Andreas Maus a.maus at science-computing.de
Tue Apr 22 17:09:59 CEST 2008


On Tue, Apr 22, 2008 at 05:34:21PM +0300, X Y wrote:
> Hello all!  
Hi.

> 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.  
 Don't worry ;)

> 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  
*aeh* whats that '?' before N:... ?
Is this an error of your mailclient or is it indeed in your command?
Can you attach the script (to avoid error due copy and paste)?

> *Here i stumbled on first error.  
>   
> ERROR: expected timestamp not found in data source from  
> N:2991935:6312:44368311:5850271:1302:318461263: not found  
Well maybe the magic '?' in the command is _really_ in the command.
This error indicates that you called:
rrdtool update ... _AND_ then ?N:$mail_input:$...

(These are two errors. "expected timestamp" from rrdtool and "18461263: not found" from the shell).

> 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 \  
[... snipp ...]
See the mystic '?' again !
I guess thats really the reason your commands failed.

HTH,

Andreas.

-- 
Dipl.-Ing. Andreas Maus             science+computing ag
System Administration               Hagellocher Weg 73
tel.: +49 7071 9457 671             72070 Tuebingen, Germany
fax: +49 7071 9457 411              www.science-computing.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20080422/4e4a84ba/attachment-0001.bin 


More information about the rrd-users mailing list