I think I get what you are asking, and I believe that RrdTool/JRobin already 
handles the case that you are worried about.

It's a little difficult explaining it, so I am going to point you to the 
RrdTool webpage on rrdcreate:

http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html

See the points about the heartbeat & step values for your datasource, and also 
about the XFF value and how it affects stored values.

Ron

-----Original Message-----
From: xuemei [mailto:xuemei.ji...@gmail.com] 
Sent: Monday, July 16, 2012 1:57 PM
To: opennms-devel@lists.sourceforge.net
Subject: Re: [opennms-devel] RrdUtils.updateFile skip the timestamp which is 
expired

Thanks for all the answers, I really appreciated cause people told me that it 
is not so useful to ask question here, I am gonna tell them, it helps! lol

Ok, go back to the topic, I decide to do sth very ugly, because by now I cant 
find a nice way to realize it.

Based on the source code in the project Jrobin inspector,how it update the
value:
Robin robin = rrd.getArchive(arcIndex).getRobin(dsIndex);
robin.setValue(rowIndex, value);

I only could do it in a kind of ugly way, scan all the archives from the 
rrdFile, then scan the records in the robin,  then compare the timestamp in the 
record with the data I wana update(the data has timestamp and value). In the 
way, I could locate the record for update the new value using 
robin.setValue(rowIndex, value);

it is a little painful, but as we do need this function, by now I cant find a 
better way. How do you think? As I said, the openNMS collection, when the data 
is delay, it could cause the gap.

I wish to have your answers soon because I may leave this project as I progress 
so slow, waster too much time, lol. 

best regards,

Xuemei


--
View this message in context: 
http://opennms.530661.n2.nabble.com/RrdUtils-updateFile-skip-the-timestamp-which-is-expired-tp7580325p7580387.html
Sent from the OpenNMS - devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat 
landscape has changed and how IT managers can respond. Discussions will include 
endpoint security, mobile security and the latest in malware threats. 
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

This e-mail message is being sent solely for use by the intended recipient(s) 
and may contain confidential information.  Any unauthorized review, use, 
disclosure or distribution is prohibited.  If you are not the intended 
recipient, please contact the sender by phone or reply by e-mail, delete the 
original message and destroy all copies. Thank you.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

Reply via email to