in reply to Data structure for statistics

Sounds like a job for rrdtool.