This is a discussion on Re: [rrd-users] rrdupdate problem within the RRD Users forums, part of the Networking and Network Related category; On Thu, Nov 22, 2007 at 04:34:20PM +0100, Andras Dosztal wrote: > I have a problem updating my ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Thu, Nov 22, 2007 at 04:34:20PM +0100, Andras Dosztal wrote:
> I have a problem updating my rrd files. My script should do the following: > 1. Separate data from a raw file to variables Debug these variables. > 2. Update the rrd files (create them, if they don't exist) in every 10 > minutes. The filename is <MAC_address>.rrd See comments below > 3. Make some graphs. but not when a new database was created. No problem though. > The problem is that after updating, the rrd file contains only NaN > values. I get no errors when running the script. After updating in general, or only after the first update? > #!/bin/bash > > OUTDIR="/srv/www/htdocs/rrd" > WORKDIR="${HOME}/rrd" > > RAW=`cat $WORKDIR/raw.dat` > for i in $RAW > do [snip: get vars] > if [ -s ${MAC}.rrd ]; then > rrdtool update ${WORKDIR}/${MAC}.rrd > N:${U_RX}:${U_SNR}:${M_TX}:${M_SNR}:${M_RX} no problem here. However, it would make sense to use an absolute timstamp instead of "N", this also makes debugging possible when you write the rrdtool update command to a log file for future reference. [snip: create graphs] > > else > rrdtool create ${WORKDIR}/${MAC}.rrd \ > --step 600 \ > --start now \ Start is 'now'. > DS:u_rx:GAUGE:1200:U:U \ > DS:u_snr:GAUGE:1200:0:U \ > DS:m_tx:GAUGE:1200:0:U \ > DS:m_snr:GAUGE:1200:0:U \ > DS:m_rx:GAUGE:1200:U:U \ > RRA:LAST:0.5:1:144 \ > RRA:AVERAGE:0.5:6:168 \ > RRA:AVERAGE:0.5:144:31 \ > RRA:AVERAGE:0.5:1008:52 > > rrdtool update ${WORKDIR}/${MAC}.rrd > N:${U_RX}:${U_SNR}:${M_TX}:${M_SNR}:${M_RX} > fi Update is also 'now'. It is highly likely that you do not fill an entire RRA-step. See my site, the part about normalization and consolidation. -- Alex van den Bogaerdt http://www.vandenbogaerdt.nl/rrdtool/ _______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users |
![]() |
| Thread Tools | |
| Display Modes | |
|
|