Discussion:
[rrd-users] [GRAYMAIL] RE: Re: Re: RE: RE: Question about trend line
(too old to reply)
rseiwert
2015-08-15 03:37:49 UTC
Permalink
Wait I actually sent an email with some crazy calculation to get it. There is a vdef function called stepwidth but I think u need to be on a latest version of rrd

Sent from my Windows Phone
________________________________
From: Ondrej [via RRD Mailinglists]<mailto:ml-node+***@n2.nabble.com>
Sent: ‎8/‎14/‎2015 5:06 PM
To: Robert C. Seiwert<mailto:***@vcaglobal.com>
Subject: [GRAYMAIL] RE: Re: Re: RE: RE: Question about trend line

I somehow ended up with desired output and used your way for equation for getting a number a process it in CDEF to get the final line.

CDEF:trend=dt_month,POP,$COEF,COUNT,* \

$COEF is my final previously calculated number that is close to "24" when you print it, but I still have doubts about that number. How to get "step width" that you mentioned? Playing with numbers I found that "19500" as step width, gives proper line direction, but gives me no clue why 19500. This is rather match question but I would still appreciate your comment on that.
thanks

[Loading Image...]

________________________________
If you reply to this email, your message will be added to the discussion below:
http://rrd-mailinglists.937164.n2.nabble.com/Question-about-trend-line-tp7583077p7583100.html
To start a new topic under RRDtool Users Mailinglist, email ml-node+***@n2.nabble.com
To unsubscribe from RRD Mailinglists, click here<http://rrd-mailinglists.937164.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=937164&code=cm9iQHZjYWdsb2JhbC5jb218OTM3MTY0fC0yMTE0MzU4MzIz>.
NAML<http://rrd-mailinglists.937164.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Question-about-trend-line-tp7583077p7583101.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
Ondrej
2015-08-16 15:16:29 UTC
Permalink
Unfortunately i did not received any email from you. I tried to send you one
and it ended up in my inbox only, not sure if it ended up at yours too.



--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Question-about-trend-line-tp7583077p7583102.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
rseiwert
2015-08-18 18:30:33 UTC
Permalink
I think I might have gotten bumped off the list as I don't see my replies.
Ondrej, hope this reaches you.
While your data may have a step of 300 secs and you might even set the step
size on the command line or even on the rrd datasource def this is not the
step size used. The step used will be the number of seconds that can fit in
one pixel. You can force the step by controlling the image resolution and
the time range or just calculate the step knowing the image resolution and
time range. In some of my scripts I force an image resolution of 4k so that
step size can be 60 secs. This actually allows me to use the rate of change
in a meaningful way. If my LSLSlope is 10Mb and my step is 60 that's
10Mb/min.

Inside RRD I calculate the stepwidth with the following.

CDEF:c=var1,COUNT,EXC,POP --- The count of steps as a data set from 1
to end of chart
CDEF:t=var1,TIME,EXC,POP --- time range of graph as a data set
VDEF:tmin=t,MINIMUM --- starting time
VDEF:tmax=t,MAXIMUM --- ending time
VDEF:cmax=c,MAXIMUM --- count of steps plus one
CDEF:s=var1,POP,tmax,tmin,-,cmax,1,-,/ --- data set of stepwidth,
calculated from (end time - start time) / (count -1)
VDEF:stepwith=s,MAXIMUM --- stepwidth as a single value

Cannot do RPN on a VDEF so do the math into a dataset, then pull a value.
Max or Min doesn't matter. Every value is the same.

Inside RRD 1.5.4 there is a function STEPWIDTH. The width of the current
step in seconds. This is a fairly recent version. You can use this to get
the step size with fewer calculations.
CDEF:step=var1,STEPWIDTH,EXC,POP
VDEF:stepw=step,MAXIMUM

Now if I could get some to tell me how to gprint this as
Days:Hours:Mins:Secs. When I look at a one year graph I GPRINT the stepwidth
on the graph but what is a step of 64.8k seconds? 7.5 days would be much
more clear. That info combined with the slope of say 10GB tells me my rate
of change is 10GB every week (roughly). Now if I could get seconds to scale
like bytes do with SI units for time.




--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Question-about-trend-line-tp7583077p7583108.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
Loading...