Hi Geoffrey, I'm by no means an expert on RRDTool, but allow me to offer a few suggestions based on my own experience.
1. Use COUNTER type rather than GAUGE. A counter is made for this sort of thing, whereas you must jump through some hoops to get a delta byte count for a GAUGE. Just update your rrd with the current byte count and let the COUNTER handle the rest. 2. Perhaps your ifconfig wrapper isn't working quite like it should. If you're using a Linux box, try 'cat /proc/net/dev' instead. It's much easier to parse as there is one line of output per interface. 3. It's unnecessary to divide by 1024 (or anything else for that matter). The grapher will automatically append the proper suffix (k or M) to your vertical labels for you. This will dictate that you change your vertical label from "KBytes/second" to "bytes/second", but I think you'll be happier in the long run. Of course, just multiply by 8 within your CDEFs if you'd prefer a bits/second measurement. Also, when dealing with network traffic, use the default base of 1000, not 1024. 1000 bytes = 1 kbyte. 4. It's unnecessary to divide by 60. RRDTool uses your update time delta to do the averaging for you. Just update your rrd with the current timestamp and current byte counts, and you'll be fine. No other manipulations are necessary. 5. Use GPRINTs instead of a COMMENTs in your graph. That way you won't have to bother with extra calculations. i.e. "GPRINT:outbd:AVERAGE:Out %02.2lf%S". I hope this helps. Clay > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Gallaway > Sent: Monday, May 24, 2004 11:19 AM > To: [email protected] > Subject: [rrd-users] Database never updates > > > Hello, I'm trying to create a bandwidth utilization graph for my router. > I don't want to install SNMPd and use up the little RAM I have in the > box so I just decided to write a shell script to wrap ifconfig. However, > it's not working, the database is created but no values are ever > entered. just ton's of NaN's. The script is below: > > #!/bin/sh > if [ ! -a /home/geoffeg/rrdscripts/eth0.rrd ]; then > rrdtool create /home/geoffeg/rrdscripts/eth0.rrd \ > --step 60 \ > DS:inbound:GAUGE:120:0:U \ > DS:outbound:GAUGE:120:0:U \ > RRA:AVERAGE:0.5:1:43200 > fi > <snip> __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
