[rrd-users] RRD Graph Data
Greetings, I'm trying to do a php script to flat some graphics of mine, for example I have a graph showing 46.33M and I want it to be cut down to 46M precisely. So I did some coding on exporting the XML, editing it and reimporting the dump. So far so good. Here my question: I exported the data of a single time, for example: * rrdtool fetch myrrd.rrd AVERAGE -s '20160608 18:00' -e '20160608 18:00'* and I get the values: *1465409100: 3.5134258945e+05 3.2815561127e+06* Converting them to MB would be: >>> float("3.5134258945e+05") / 1000 / 1000 * 8 *2.810740715606* >>> float("3.2815561127e+06") / 1000 / 1000 * 8 *26.2524489016* When I use rrdgraph , the result is diferent. It gives me 3.90M and 29.27M to the exactly same time, from the same rrdfile. I'm doing the graph with the following options: --start '20160608 18:00' --end '20160608 1800' DEF:in=myrrd:in:AVERAGE DEF:out=myrrd:out:AVERAGE CDEF:bits_in=in,8,* CDEF:bits_out=out,8,* AREA:bits_in#00FF00:RX LINE1:bits_out#FF:TX Pretty simple graph, showing the average traffic of input and output, multiplied by 8 to get the value into megabits per second, since the rrd data is fetched from InOctets and OutOctes via snmp. I wonder if some of you would know why the rrdfetch is not showing the same data as the rrdgraph. Thanks in advance. -- - Arch Linux - Usuário Linux #470599. LPI ID: LPI000187143 - Desenvolvedor Java/Python/Web - +55 (88) 9713-7657 - Bacharel em Sistemas de Informação pela Estácio ( http://www.estacio.br/ ) - Irc: lokidarkeden at freenode.com - http://www.leandrocosta.pro.br ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] RRD Graph Data
before anything else: > * rrdtool fetch myrrd.rrd AVERAGE -s '20160608 18:00' -e '20160608 18:00'* > --start '20160608 18:00' > --end '20160608 1800' What does the graph show as end time? Is it really 24 hours after start time? Not sure if "1800" will be recognized as "18:00". If it is: make sure the amount of pixels in the graph is an integer number times the amount of CDPs you're graphing. E.g. if you are collecting data in a one hour resolution, the number of pixels in the graph should be n*24 (360 would be a nice number in that case). ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] RRD Graph Data
Hi Alex, I'm not graphing 24h. I've made a test with a single point in time, same start and and date/time ( 20160608 18:00 ). The graph shows one value while the rrdfetch gives me other one. On Thu, Jun 9, 2016 at 9:56 AM, Alex van den Bogaerdt < a...@vandenbogaerdt.nl> wrote: > before anything else: > > > > * rrdtool fetch myrrd.rrd AVERAGE -s '20160608 18:00' -e '20160608 > 18:00'* > > > --start '20160608 18:00' > > --end '20160608 1800' > > What does the graph show as end time? Is it really 24 hours after start > time? Not sure if "1800" will be recognized as "18:00". > > If it is: make sure the amount of pixels in the graph is an integer number > times the amount of CDPs you're graphing. > > E.g. if you are collecting data in a one hour resolution, the number of > pixels in the graph should be n*24 (360 would be a nice number in that > case). > > > ___ > rrd-users mailing list > rrd-users@lists.oetiker.ch > https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users > -- - Arch Linux - Usuário Linux #470599. LPI ID: LPI000187143 - Desenvolvedor Java/Python/Web - +55 (88) 9713-7657 - Bacharel em Sistemas de Informação pela Estácio ( http://www.estacio.br/ ) - Irc: lokidarkeden at freenode.com - http://www.leandrocosta.pro.br ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] RRD Graph Data
Leandro Costa wrote: > Hi Alex, I'm not graphing 24h. I've made a test with a single point in time, > same start and and date/time ( 20160608 18:00 ). > The graph shows one value while the rrdfetch gives me other one. And what resolutions do you have consolidations for, and what consolidations are the two commands giving you ? rrdgraph will automatically select the highest resolution that covers the required timespan, I don't know what rrdfetch will select by default. It may be worth explicitly specifying the resolution to be used and see what difference that makes. What I'm trying to say is that the graph may be showing the average for the previous 5 minute period, while fetch is showing you the average for the previous 30 minutes. ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] RRD Graph Data
Hmmm Alex, got it. I used this options to create the database: RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:444:797 and my datasources are: DS:in:COUNTER:600:U:U DS:out:COUNTER:600:U:U I will look for how to specify the resolution on fetch, thanks for your help. On Thu, Jun 9, 2016 at 10:17 AM, Simon Hobson wrote: > Leandro Costa wrote: > > > Hi Alex, I'm not graphing 24h. I've made a test with a single point in > time, same start and and date/time ( 20160608 18:00 ). > > The graph shows one value while the rrdfetch gives me other one. > > And what resolutions do you have consolidations for, and what > consolidations are the two commands giving you ? > > rrdgraph will automatically select the highest resolution that covers the > required timespan, I don't know what rrdfetch will select by default. It > may be worth explicitly specifying the resolution to be used and see what > difference that makes. > What I'm trying to say is that the graph may be showing the average for > the previous 5 minute period, while fetch is showing you the average for > the previous 30 minutes. > > ___ > rrd-users mailing list > rrd-users@lists.oetiker.ch > https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users > -- - Arch Linux - Usuário Linux #470599. LPI ID: LPI000187143 - Desenvolvedor Java/Python/Web - +55 (88) 9713-7657 - Bacharel em Sistemas de Informação pela Estácio ( http://www.estacio.br/ ) - Irc: lokidarkeden at freenode.com - http://www.leandrocosta.pro.br ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] RRD Graph Data
> Hmmm Alex, got it. you're responding to Simon's reply. Just to make that clear. > RRA:AVERAGE:0.5:1:600 > RRA:AVERAGE:0.5:6:700 > RRA:AVERAGE:0.5:24:775 > RRA:AVERAGE:0.5:288:797 > RRA:MAX:0.5:1:600 > RRA:MAX:0.5:6:700 > RRA:MAX:0.5:24:775 > RRA:MAX:0.5:444:797 > > > and my datasources are: > > DS:in:COUNTER:600:U:U > DS:out:COUNTER:600:U:U default step size of 300 seconds? If RRDtool does what it promises, you could set the end time to some time n*300s, and set the start time to "end-300s". That should give you one stores rate out of the RRA with each CDP is 1 PDP. Simon wrote: >> What I'm trying to say is that the graph may be showing the average for >> the previous 5 minute period, while fetch is showing you the average for >> the previous 30 minutes. don't know how accurate RRDtool is nowadays but there was a time when start and/or end times were "massaged" to some other number than one would expect. When discussed as such, the response was more "don't care" than "will fix", and that's when I lost my passion. Different versions had (have?) different problems, so whoever is trying similar things should be prepared to closely look what *exactly* is happening, as opposed to how it *should* behave (read: is documented). ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] RRD Graph Data
> Different versions had (have?) different problems, so whoever is trying > similar things should be prepared to closely look what *exactly* is > happening, as opposed to how it *should* behave (read: is documented). To clarify: you ask time "end-300" upto and including "n" (expecting 1 CDP exactly), but instead you get "n-600" to "n+300", or "n-600" to "n-300", or ... or ... or ... ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Re: [rrd-users] RRD Graph Data
Ok, thanks Simons, :). On Thu, Jun 9, 2016 at 11:17 AM, Alex van den Bogaerdt < a...@vandenbogaerdt.nl> wrote: > > Hmmm Alex, got it. > > you're responding to Simon's reply. Just to make that clear. > > > RRA:AVERAGE:0.5:1:600 > > RRA:AVERAGE:0.5:6:700 > > RRA:AVERAGE:0.5:24:775 > > RRA:AVERAGE:0.5:288:797 > > RRA:MAX:0.5:1:600 > > RRA:MAX:0.5:6:700 > > RRA:MAX:0.5:24:775 > > RRA:MAX:0.5:444:797 > > > > > > and my datasources are: > > > > DS:in:COUNTER:600:U:U > > DS:out:COUNTER:600:U:U > > default step size of 300 seconds? > > If RRDtool does what it promises, you could set the end time to some time > n*300s, and set the start time to "end-300s". That should give you one > stores rate out of the RRA with each CDP is 1 PDP. > > Simon wrote: > >> What I'm trying to say is that the graph may be showing the average for > >> the previous 5 minute period, while fetch is showing you the average for > >> the previous 30 minutes. > > don't know how accurate RRDtool is nowadays but there was a time when > start and/or end times were "massaged" to some other number than one would > expect. When discussed as such, the response was more "don't care" than > "will fix", and that's when I lost my passion. > > Different versions had (have?) different problems, so whoever is trying > similar things should be prepared to closely look what *exactly* is > happening, as opposed to how it *should* behave (read: is documented). > > > -- - Arch Linux - Usuário Linux #470599. LPI ID: LPI000187143 - Desenvolvedor Java/Python/Web - +55 (88) 9713-7657 - Bacharel em Sistemas de Informação pela Estácio ( http://www.estacio.br/ ) - Irc: lokidarkeden at freenode.com - http://www.leandrocosta.pro.br ___ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users