Hi,
there is one problem with the sqlite db: Afaik sqlite3 doesn't really know
about datatypes apart from the standard types (like integer, text etc..) and
uses a dynamic type system.
So the query for inserting a new counter value to the database does not insert
the timestamp as unix time as expected but as string ( db.c:1037
datetime('now') ).
Something like strftime('%s','now') would make much more sense, rrd also
uses
unix time for updating rrd files.
Am Freitag 25 Dezember 2009 03:07:34 schrieb Harald Welte:
Hi Clemens,
On Fri, Dec 25, 2009 at 01:41:06AM +0100, Clemens Hopfer wrote:
At the moment it only supports one data source
for a single rrd file, but
I'll add commandline options for the file and counter name.
I think this is the easiest solution, adding a new counter is just
creating a new rrd file and adding a cronjob.
well, it's also easy to generate a list of the counters from the sql
database by using something like "select unique(name) from counters" and
then iterate over that list...
It would be great if someone could post some
sample data to do some
tests.
I cannot send you the full hlr.sqlite3 of my test machine, sorry. but I've
attached the output of 'sqlite3 -csv hlr.sqlite3 "select * from
counters;"'. The counter values are very low as I've been playing around
with few phones and few events, but it should give you a feeling for it.
btw: Will you be at 26C3?