Friends, Apologies if this has been discussed elsewhere, it seems to me like a common enough problem but I couldn't find a solution described anywhere. I'm trying to graph stock market volume. As you can see, the data is a counter that gets updated roughly every 30 minutes and resets at the end of the day:
TIME (UNIX TIME) NASDAQCOMP VOL Tue Apr 24 15:00:05 2007 (1177441205) 1798518651 Tue Apr 24 15:30:05 2007 (1177443005) 1952143339 Tue Apr 24 16:00:04 2007 (1177444804) 2214507628 Tue Apr 24 16:30:03 2007 (1177446603) 2306049386 Tue Apr 24 17:00:02 2007 (1177448402) 2332135566 Tue Apr 24 17:30:02 2007 (1177450202) 2342303973 Tue Apr 24 18:00:03 2007 (1177452003) 2345873356 Tue Apr 24 18:35:01 2007 (1177454101) 2347341668 Wed Apr 25 10:00:09 2007 (1177509609) 401969956 Wed Apr 25 10:30:07 2007 (1177511407) 666108171 Wed Apr 25 11:00:10 2007 (1177513210) 858504492 I'd like to define an RRA with one DS and be able to generate two kinds of graphs - trending market activity during the day (trades/sec), and trending daily volumes (total trades each day) to see if the market is getting busier in the long run. I've thought of several different approaches and none of them work sufficiently. 1. I define my DS as a COUNTER. This would give me trades per second, but how would I handle the counter reset after every day? Also, I see no way to get the total volume for a day out of the RRA. If my DS type performed some kind of rate of change calculation, how do I integrate the DS to get the actual values back? 2. I define my DS a a GAGUE. Is there a way to graph deltas? How can I define a CDEF that calculates the difference between two consecutive polls (I don't even necessarily need to divide by the step size - a graph of trades per 1/2 hour is just as good as trades per second). For the second graph, I would want to keep the last value for each day, since that represents the total. Can I define an RRA to do that? If I take the LAST of the past 48 PDP (48 half hours in a day), that doesn't mean I will get the last value unless I initially start polling in the beginning of the day. 3. I define my DS as a GAGUE, but do some pre-processing before updating. I could subtract the last value from the current value and just update the deltas. This helps with the first graph, but now I need an RRA with a CF of SUM, which doesn't exist. I really don't want to define more than one DS and deal with the complexity of updating multiple RRD's with the same data. Please, any advice would be appreciated. Thanks, Dan Goldburt _______________________________________________ rrd-users mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
