[rrd-users] Not correct numbers in db
vladoportos at vladoportos.sk
vladoportos at vladoportos.sk
Sun Jun 17 22:08:19 CEST 2007
Hi all,
i made a graph which show online users and getting data from mysql and so
on...
but when i look on what data are feeded to rrd they look like this:
58 38
and in rrd it looks like this:
1182109560: 5.8000000000e+01 3.7985531650e+01
But in graph last values are 58 (OK) and second one is 37 ( not OK )
rrd db look like this
rrdtool.create(cesta, '--step', '120', 'DS:ali_online:GAUGE:240:0:1000',
'DS:hord_online:GAUGE:240:0:1000', 'RRA:LAST:0.5:1:240')
### Its in python script and it updating db every 2min and should keep
data for 8hours ( no average or anything just curent data )
and my graphs parameters look like this:
def graf(spolu):
cas = strftime("%a, %d %b %Y %H\:%M\:%S")
rrdtool.graph(obr_cesta, '--width', '510',
'--height', '130',
'--imgformat', 'PNG',
'--base', '1000',
'--alt-autoscale-max',
'--vertical-label', 'Online players',
'--x-grid', 'MINUTE:10:HOUR:1:HOUR:1:0:%H:%M',
'--color', 'FONT#A0A0A0',
'--color', 'BACK#272727',
'--color', 'CANVAS#3C333C',
'--color', 'SHADEB#333333',
'--color', 'SHADEA#707070',
'--color', 'FONT#AAAAAA',
'--start', '-8h', '-e', '-300',
'DEF:ali_online='+cesta+':ali_online:LAST',
'DEF:hord_online='+cesta+':hord_online:LAST',
'--lower-limit', '0',
'COMMENT: Maximum
Priemer Aktualne \\n',
'AREA:ali_online#3574ECC0:Aliancie Online:STACK',
'GPRINT:ali_online:MAX:%8.0lf',
'GPRINT:ali_online:AVERAGE: %8.0lf',
'GPRINT:ali_online:LAST: %8.0lf%s\\n',
'AREA:hord_online#E55451C0:Hordy Online:STACK',
'GPRINT:hord_online:MAX: %8.0lf',
'GPRINT:hord_online:AVERAGE: %8.0lf',
'GPRINT:hord_online:LAST: %8.0lf\\n',
'COMMENT: ',
'COMMENT:'+cas+'\\n',
'COMMENT: \:\:Gbely ON\:\: All online players\:
'+spolu+'')
But its show wrong data i gues its in parts "%8.0lf\\n'" <-- no idea what
is this, or RRA:LAST:0.5:1:240 (what for is 0.5 there ?)
Any idea what im doing wrong ?
Thank you and best regards
Vladimir
More information about the rrd-users
mailing list