<div dir="ltr"><span class="ul-threaded" style="margin: 0.5em 0pt 0pt -20px;"><span class="text-cell">HELLO,
<br> I use RRDtool for the first time, I create RRD database to
supervise traffic of successful requests of one server. The number of
successful requests are generated every 60 seconds, and stored in a file
named data.log, it looks like :
<br><br> 10/08/31-02:46:56 131
<br> 10/08/31-02:46:56 138
<br> 10/08/31-02:46:56 144
<br> 10/08/31-02:47:56 119
<br> 10/08/31-02:47:56 121
<br> 10/08/31-02:47:56 122
<br> 10/08/31-02:48:56 118
<br> 10/08/31-02:48:56 119
<br> 10/08/31-02:48:56 121
<br> 10/08/31-02:49:56 130
<br> 10/08/31-02:49:56 136
<br> 10/08/31-02:49:56 140
<br> 10/08/31-02:49:56 4
<br> 10/08/31-02:50:56 117
<br> 10/08/31-02:50:56 129
<br> 10/08/31-02:50:56 135
<br> i want to take data for example each 5min, average it and store it in my rrd database my script shell is:
<br><br> #!/bin/sh
<br> FICRRD=$(basename $0 .sh) # i give my script the name 'essai.sh'
<br> # - Date initialization :
<br> DTDEB=$(date -d "20100831 02:46:56" +'%s')
<br> # - Creation of my database:
<br> echo "Creation of database ${FICRRD}"
<br> rrdtool create ${FICRRD}.rrd \
<br> -b ${DTDEB} \
<br> -s 60 #update every 1 minute so i can collect all data.
<br> DS:${FICRRD}:GAUGE:120:0:U \
<br> RRA:AVERAGE:0.5:5:6
<br> # CDP=5 PDP(1 PDP collected each 60s), we stored each 30 min.
<br><br> # -store data:
<br> while read line
<br> do
<br> val=$( cut -d" " -f2 data.log) # val contains the number of successful requests
<br> rrdtool update ${FICRRD} $DTDEB:$val
<br> done <data.log
<br>------
<br>when i run my script shell using the command ./essai.sh i get this:
<br>ERROR: you must define at least one Round Robin Archive
<br>./essai.sh: 26: -b: not found
<br>./essai.sh: 30: DS:essai:GAUGE:600:0:U: not found
<br>./essai.sh: 31: RRA:AVERAGE:0.5:5:6: not found
<br><br>what am I doing wrong ?
<br>I'm using Ubuntu 10.04, RRDtool 1.3.8
<br>I hope anyone can help.
<br><br>best regards,
        
                
        
</span></span></div>