Re: [rrd-users] VRULE for sunset, sunrise

This is a discussion on Re: [rrd-users] VRULE for sunset, sunrise within the RRD Users forums, part of the Networking and Network Related category; On Sun, Aug 26, 2007 at 06:45:52AM -0700, Joseph Mack NA3T wrote: > I'm collecting weather data ...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-26-2007
Alex van den Bogaerdt
 
Posts: n/a
Default Re: [rrd-users] VRULE for sunset, sunrise

On Sun, Aug 26, 2007 at 06:45:52AM -0700, Joseph Mack NA3T wrote:

> I'm collecting weather data and would like to plot the
> sunrise and sunset time with a VRULE. It seems that VRULE
> must be passed a number, rather than whatever is in a
> DEF/CDEF variable. I can extract sunset/sunrise into shell
> variables and plot them with VRULE, but I'd like to be able
> to save the sunrise/sunset times into a rrd database and
> recall them later.


Do you want to plot those times, or does it HAVE to be using vrule ?

I can think of ways to achieve what you apparently want. Those ways
do not include VRULE.

First thing to consider: rrdtool works with intervals, not with
times (except vrule, which won't work afaik).

You'll have to deal with consolidation, and want to distinguish
between relevant times (sunset, sunrise) and irrelevant times.

The database resolution needs to be in the same resolution as you
want your data. If you have 86400 seconds per rra-row, you won't
be able to have two different times (time ranges really). This
means: use one minute per row, or even one second.

Then think about what you want to see. Do you want a spike at
sunrise and sunset, or do you want to display daylight and night?

Intervals have a beginning, duration and end. Suppose you want to
display the period between sunrise and sunset, you do want to include
the interval which ends at sunset but you do NOT want to include the
interval which ends at sunrise.

If on the other hand you want spikes, you need mostly UNKN or zero
in your database, with an occasional INF or high value.

In both cases: I'm not sure what happens when {UN,UN,UN,UN,INF,UN,UN,UN}
(for example) is consolidated. Try it. If that results in INF then
you could use UNKN for graph off and INF for graph on (be it a spike
or a range). Else, use zero and a huge value, then use a CDEF to
find the difference between zero and non-zero. Change non-zero into
INF and continue.

Graphing is a matter of displaying the resulting data. INF results
in a bar upto the top of the graph, UNKN or zero won't be visible.

--
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/

_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:25 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0