This is a discussion on Re: [rrd-users] Aggregation functions for combining whole data sets within the RRD Users forums, part of the Networking and Network Related category; Hi Alex, Alex van den Bogaerdt wrote: > You can combine those two CDEFs: > > CDEF:avg=watin001,watin002......
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi Alex,
Alex van den Bogaerdt wrote: > You can combine those two CDEFs: > > CDEF:avg=watin001,watin002...watin024,+,+,...+,24,/ Argh, right I need more experience with RPN, I assumed the stack is just filled and worked through from right to left - I was wrong. > > Be aware of the following: should one (or more) of these DSes become > unknown, the sum will be unknown. > Yes, I already knew that. Yo ucertainly don't want to see how I emulated the AVG function to cope with that. Let's only say these lines were LONG and contained a lot if IFs (one for the sum and one for the counting). > For this reason, AVG exists: CDEF:x=a,b,c,d,4,AVG Cool, thanks! I somehow missed these when reading the docs - now I found them! > > One possible problem though: if only one out of 24 is known, that will > become the 'average'. Sure, but might be solved by also showing how many non-UNKNOWN values in the same graph. Related question: Is there a good way to count the number of non-UNKNOWNs? I would do it like this (6 values): CDEF:num=watin001,UN,watin002,UN,watin003,UN,watin 004,UN,watin005,UN,watin006,UN,+,+,+,+,+ but again, I might miss something. Thanks a lot Carsten _______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users |