[rrd-users] [GRAYMAIL] Re: Block GPRINT when values not defined?
rob at vca.com
Wed May 14 05:39:38 CEST 2014
That sounds interesting and useful but not what we both asking for.
I would be happy with unknown dates printing nothing at all, padded to the size of the requested format. What the OP complained about was the when the value is undefined/Unknown/NaN, strftime prints 1/1/1970 which would be correct if the date were known and it’s value was 0. For me at -5 UTC so it’s always New Years Eve (unless my disk array is going to run out of space then it’s 2014 ☹.
From: S Shipway [via RRD Mailinglists] [mailto:ml-node+s937164n7582064h35 at n2.nabble.com]
Sent: Tuesday, May 13, 2014 7:00 PM
To: Robert C. Seiwert
Subject: [GRAYMAIL] Re: Block GPRINT when values not defined?
So, to generalise this, what you’re asking for is to be able to do a *conditional* GPRINT, maybe by having an additional option that specifies an RPN function, and the GPRINT is only done if said RPN evaluates to non-zero?
This seems a good idea, though it is not currently possible to achieve it with unmodified RRDTool, as far as I know.
I’d like a syntax such as:
GPRINT:myvdef:My value hit max at %c:strftime:onlyif=myvdef,UN,0,1,IF
(since we do not have a NOT statement in RPN (yet) the IF is needed to revers is ‘is unknown’ test)
A secondary improvement would be (as you mentioned) for an Unknown value to print ‘never’ rather than Jan 1st 1970.
rrd-users mailing list
[http://rrd-mailinglists.937164.n2.nabble.com/images/icon_attachment.gif]smime.p7s (7K) Download Attachment<http://rrd-mailinglists.937164.n2.nabble.com/attachment/7582064/0/smime.p7s>
If you reply to this email, your message will be added to the discussion below:
To start a new topic under RRDtool Users Mailinglist, email ml-node+s937164n937053h94 at n2.nabble.com<mailto:ml-node+s937164n937053h94 at 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=cm9iQHZjYS5jb218OTM3MTY0fC0xMzA5NDI1MzI4>.
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Block-GPRINT-when-values-not-defined-tp7582060p7582067.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
More information about the rrd-users