<div dir="ltr"><div><div>Stveve<br><br></div>Don't have a lot of time at the moment. might get around to doing a bit on the weekend.<br><br></div>i have checked the cdef by producing a graph. That works ok.<br><br>push ( @options, 'DEF:CurTotl=' . $database . ':CurTotl:MAX' ) <br>
push ( @options, 'CDEF:wrong=CurTotl,UN,10,0,IF' ) <br><div>
push (@options, 'VDEF:Wrong=wrong,MAXIMUN'); <br>push (@options, 'AREA:wrong#009909:MISSING'); <br>push (@options, 'PRINT:Wrong:%5.2lf'); <br>
push (@options, 'PRINT:Wrong:%c:strftime'); <br><br>@Data = RRDs::graph('test.png',@options); </div><div><br></div><div> John<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 12 August 2013 11:23, <span dir="ltr"><<a href="mailto:rrd-users-request@lists.oetiker.ch" target="_blank">rrd-users-request@lists.oetiker.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Send rrd-users mailing list submissions to<br>
<a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:rrd-users-request@lists.oetiker.ch">rrd-users-request@lists.oetiker.ch</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:rrd-users-owner@lists.oetiker.ch">rrd-users-owner@lists.oetiker.ch</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of rrd-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: RHEL6 - rrdtool dumping text (Tobi Oetiker)<br>
2. Detecting and handling unknown data (John huysing)<br>
3. Re: Detecting and handling unknown data (Steve Shipway)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sat, 10 Aug 2013 23:21:47 +0200<br>
From: Tobi Oetiker <<a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a>><br>
Subject: Re: [rrd-users] RHEL6 - rrdtool dumping text<br>
To: Joe Loiacono <<a href="mailto:jloiacon@csc.com">jloiacon@csc.com</a>><br>
Cc: "<a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a>" <<a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a>>,<br>
"rrd-users-bounces+jloiacon=<a href="mailto:csc.com@lists.oetiker.ch">csc.com@lists.oetiker.ch</a>"<br>
<rrd-users-bounces+jloiacon=<a href="mailto:csc.com@lists.oetiker.ch">csc.com@lists.oetiker.ch</a>><br>
Message-ID: <<a href="mailto:31785470-DBBB-4155-B087-70CF44F0D34A@oetiker.ch">31785470-DBBB-4155-B087-70CF44F0D34A@oetiker.ch</a>><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
<br>
On 10.08.2013, at 22:30, Joe Loiacono <<a href="mailto:jloiacon@csc.com">jloiacon@csc.com</a>> wrote:<br>
<br>
> Yes, I've had no problems with it on a previous install. But I built that one vs RPM'ing this one (however, that may be irrelevant).<br>
><br>
> flowviewerprime /var/www/cgi-bin/FlowViewer_4.2/Flow_Working 299 >/opt/rrdtool-1.4.7/bin/rrdtool update /var/www/cgi-bin/FlowTracker_Files/FlowTracker_RRDtool/somerville_test.rrd 1376163000:6886391<br>
> prep ds[0] last_arg 'U' this_arg '6886391' pdp_new 2038371736.00<br>
> proc_pdp_age 4 proc_pdp_st 1376162700 occu_pfp_age 0 occu_pdp_st 1376163000 int 296.000000 pre_int 296.000000 post_int 0.000000<br>
> PDP UPD ds[0] elapsed_pdp_st 1 pdp_temp 6886391.00 new_prep 0.00 new_unkn_sec 0<br>
> schedule CDP_val update, RRA 2 DS 0, DNAN<br>
> Initialize CDP_val for RRA 2 DS 0: 6886391.00<br>
> schedule CDP_val update, RRA 3 DS 0, DNAN<br>
> Initialize CDP_val for RRA 3 DS 0: 6886391.00<br>
> schedule CDP_val update, RRA 6 DS 0, DNAN<br>
> Initialize CDP_val for RRA 6 DS 0: 6886391.00<br>
> schedule CDP_val update, RRA 7 DS 0, DNAN<br>
> Initialize CDP_val for RRA 7 DS 0: 6886391.00<br>
> -- RRA Preseek 2040<br>
> -- RRA Postseek 3864<br>
> -- RRA WRITE VALUE 6.886391e+06, at 3864 CF:AVERAGE<br>
> -- RRA Preseek 3872<br>
> -- RRA Postseek 9624<br>
> -- RRA WRITE VALUE -nan, at 9624 CF:AVERAGE<br>
> -- RRA Preseek 9632<br>
> -- RRA Postseek 32224<br>
> -- RRA WRITE VALUE 6.886391e+06, at 32224 CF:MAX<br>
> -- RRA Preseek 32232<br>
> -- RRA Postseek 32992<br>
> -- RRA WRITE VALUE -nan, at 32992 CF:MAX<br>
><br>
> Joe<br>
><br>
><br>
<br>
<br>
maybe you got some debug define set while compiling<br>
<br>
in any event, get 1.4.8 ... fewer bugs more fun<br>
<br>
cheers tobi<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130810/01666879/attachment-0001.htm" target="_blank">http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130810/01666879/attachment-0001.htm</a><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 12 Aug 2013 10:53:10 +1000<br>
From: John huysing <<a href="mailto:jhuysing@gmail.com">jhuysing@gmail.com</a>><br>
Subject: [rrd-users] Detecting and handling unknown data<br>
To: <a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br>
Message-ID:<br>
<<a href="mailto:CAAWG9zAu2oneyvGZ-2Gt%2BD8uba6_1b4i67uUB%2BwJthGTfZ5Feg@mail.gmail.com">CAAWG9zAu2oneyvGZ-2Gt+D8uba6_1b4i67uUB+wJthGTfZ5Feg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
After look at the CDEF tutorial<br>
<br>
<a href="http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html" target="_blank">http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html</a><br>
<br>
and reading the section on handling unknown data<br>
<br>
I thought I would try this to see if I could detect if had unknown data in<br>
a rrd, so i could process it differently<br>
<br>
If its unknown set the value to 10 else set to 0<br>
<br>
CDEF:wrong=currTot,UN,10,0,IF<br>
<br>
VDEF:Wrong=wrong,MAXIMUM<br>
<br>
VDEF:AWrong=wrong,AVERAGE<br>
<br>
PRINT:Wrong:%5.2lf ----> returns inf<br>
<br>
PRINT:AWrong:%5.2lf ----> returns a value<br>
<br>
The 2nd problem is when I try this<br>
PRINT:AWrong:%c:strftime<br>
<br>
I always get the start of unix time ....1970<br>
<br>
<br>
John<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130812/42284927/attachment-0001.htm" target="_blank">http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130812/42284927/attachment-0001.htm</a><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Mon, 12 Aug 2013 01:22:34 +0000<br>
From: Steve Shipway <<a href="mailto:s.shipway@auckland.ac.nz">s.shipway@auckland.ac.nz</a>><br>
Subject: Re: [rrd-users] Detecting and handling unknown data<br>
To: 'John huysing' <<a href="mailto:jhuysing@gmail.com">jhuysing@gmail.com</a>>,<br>
"'<a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a>'" <<a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a>><br>
Message-ID:<br>
<<a href="mailto:7294716191A1E142B80615ED2C633BCA683DB1AD@uxcn10-2.UoA.auckland.ac.nz">7294716191A1E142B80615ED2C633BCA683DB1AD@uxcn10-2.UoA.auckland.ac.nz</a>><br>
Content-Type: text/plain; charset="gb2312"<br>
<br>
The second issue, where AWrong:%c:strftime gives the epoch (IE, time 0) is<br>
because the AVERAGE operator in a VDEF does not set the time component ?<br>
after all, what should it set it to? The MAX and MIN operators set the time<br>
component to the time of the peak in question, but AVG doesn?t have any<br>
specific point in time, hence it is not set (or rather, it is set to zero).<br>
<br>
<br>
<br>
For the first issue, I?m not sure why this should be; you should be getting<br>
?10? or ?0?, if I read it correctly. It might help to give more details<br>
? the DEF statement, the rrdinfo for the RRD file in question, and the<br>
version of RRDtool you?re using.<br>
<br>
<br>
<br>
Steve<br>
<br>
<br>
<br>
_____<br>
<br>
Steve Shipway<br>
<br>
ITS Unix Services Design Lead<br>
<br>
University of Auckland, New Zealand<br>
<br>
Floor 1, 58 Symonds Street, Auckland<br>
<br>
Phone: <a href="tel:%2B64%20%280%299%203737599%20ext%2086487" value="+6493737599">+64 (0)9 3737599 ext 86487</a><br>
<br>
DDI: <a href="tel:%2B64%20%280%299%20923%206487" value="+6499236487">+64 (0)9 923 6487</a><br>
<br>
Mobile: <a href="tel:%2B64%20%280%2921%20753%20189" value="+6421753189">+64 (0)21 753 189</a><br>
<br>
Email: <mailto:<a href="mailto:s.shipway@auckland.ac.nz">s.shipway@auckland.ac.nz</a>> <a href="mailto:s.shipway@auckland.ac.nz">s.shipway@auckland.ac.nz</a><br>
<br>
P Please consider the environment before printing this e-mail : ??????<br>
???????????<br>
<br>
<br>
<br>
From: rrd-users-bounces+s.shipway=<a href="mailto:auckland.ac.nz@lists.oetiker.ch">auckland.ac.nz@lists.oetiker.ch</a><br>
[mailto:<a href="mailto:rrd-users-bounces%2Bs.shipway">rrd-users-bounces+s.shipway</a>=<a href="mailto:auckland.ac.nz@lists.oetiker.ch">auckland.ac.nz@lists.oetiker.ch</a>] On<br>
Behalf Of John huysing<br>
Sent: Monday, 12 August 2013 12:53 p.m.<br>
To: <a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br>
Subject: [rrd-users] Detecting and handling unknown data<br>
<br>
<br>
<br>
After look at the CDEF tutorial<br>
<br>
<a href="http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html" target="_blank">http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html</a><br>
<br>
and reading the section on handling unknown data<br>
<br>
I thought I would try this to see if I could detect if had unknown data in a<br>
rrd, so i could process it differently<br>
<br>
If its unknown set the value to 10 else set to 0<br>
<br>
CDEF:wrong=currTot,UN,10,0,IF<br>
<br>
<br>
VDEF:Wrong=wrong,MAXIMUM<br>
VDEF:AWrong=wrong,AVERAGE<br>
PRINT:Wrong:%5.2lf ----> returns inf<br>
PRINT:AWrong:%5.2lf ----> returns a value<br>
<br>
The 2nd problem is when I try this<br>
PRINT:AWrong:%c:strftime<br>
I always get the start of unix time ....1970<br>
<br>
<br>
John<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130812/8dc5d601/attachment.htm" target="_blank">http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130812/8dc5d601/attachment.htm</a><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: smime.p7s<br>
Type: application/x-pkcs7-signature<br>
Size: 5900 bytes<br>
Desc: not available<br>
Url : <a href="http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130812/8dc5d601/attachment.bin" target="_blank">http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130812/8dc5d601/attachment.bin</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
rrd-users mailing list<br>
<a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br>
<a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a><br>
<br>
<br>
End of rrd-users Digest, Vol 80, Issue 6<br>
****************************************<br>
</blockquote></div><br></div>