For When You Can't Have The Real Thing
[ start | index | login ]
start > dave > experiments > Net Flows > 2008-03-26 > 2

2008-03-26 #2

Created by dave. Last edited by dave, 10 years and 332 days ago. Viewed 1,521 times. #2
[diff] [history] [edit] [rdf]

Problem in postgres2rrd

Restarted the flow collector after some rebooting and moving of the host computer, and postgres2rrd now dies with:

Error updating /var/spool/flow-rrds/ illegal attempt to update using time 1206471300 when last update time is 1206535800 (minimum one second step) at ./postgres2rrd line 143.

I tried to use the --reset option, which I put in to rebuild the rrds from scratch; this worked, but the first follow-on pass failed with a similar error. So I noticed that the --reset option wasn't clearing the record of the last time period written from the database. That was fixed.

Now when the updater runs, it is still complaining that the timeperiod it is trying to write is already written to the rrd.

Changed the selection and sort logic to be in the select statement… let the database do the heavy lifting for us:

select distinct timeslot from LocalIP where timeslot >= $previousRun order by timeslot;

Re-running the reset. (Later: Fixing the reset seems to have fixed things. It is working correctly again.)

It still takes about five minutes to run the postgres2rrd; most of that time seems to be taken up by selecting the distinct IP addresses. There's already an index on that part of the table, so I'm not really sure what to do about it.

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt