<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Piece of Unix Hints &#187; Tuning</title>
	<atom:link href="http://hints.jeb.be/tag/tuning/feed/" rel="self" type="application/rss+xml" />
	<link>http://hints.jeb.be</link>
	<description>hints.jeb.be</description>
	<lastBuildDate>Fri, 04 Dec 2009 20:35:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Counter reset problem with RRDTool</title>
		<link>http://hints.jeb.be/2008/12/17/counter-reset-problem-with-rrdtool/</link>
		<comments>http://hints.jeb.be/2008/12/17/counter-reset-problem-with-rrdtool/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 01:44:41 +0000</pubDate>
		<dc:creator>Jeb</dc:creator>
				<category><![CDATA[RRDTool]]></category>
		<category><![CDATA[Tuning]]></category>

		<guid isPermaLink="false">http://hints.jeb.be/?p=26</guid>
		<description><![CDATA[A common problem with rrdtool is to have a rrd file with one or more datasource configured as COUNTER, but your counter reset and you get an ugly high peak. There is 2 solutions to solve this In the &#8220;script&#8221; you use to generate the graph file you have something like DEF:A=/path/to/your/file.rrd:dsname:AVERAGE to get data, [...]]]></description>
			<content:encoded><![CDATA[<p>A common problem with rrdtool is to have a rrd file with one or more datasource configured as COUNTER, but your counter reset and you get an ugly high peak.</p>
<p>There is 2 solutions to solve this</p>
<ul>
<li> In the &#8220;script&#8221; you use to generate the graph file you have something like <code>DEF:A=/path/to/your/file.rrd:dsname:AVERAGE</code> to get data, then you graph it with something like LINE1:A#&#8230;..<br />
Try to add <code>CDEF:B=A,MINVALUE,GT,A,MAXVALUE,LT,A,UNKN,IF,UNKN,IF</code> and graph B instead of A.<br />
Replace MINVALUE with the minimun value you want to graph (typically 0) and MAXVALUE with the maximum value you want on the graph (100000000 or something like this).<br />
This will suppress ugly peak on the graph.</li>
</ul>
<ul>
<li>The second (better) solution is to change from COUNTER DS to DERIVE DS, to do so follow theses commands:<br />
<code># cp file.rrd file.rrd.bkup # this is to backup the file !<br />
# rrdtool tune file.rrd<br />
# rrdtool tune file.rrd --data-source-type dsname:DERIVE # this change DS dsname from COUNTER to DERIVE<br />
# rrdtool tune file.rrd --minimum dsname:0 --maximum dsname:100000000 # Set the min and max value of data you have to graph<br />
# rrdtool tune file.rrd<br />
# rrdtool dump file.rrd &gt; file.xml # Dump data to xml file<br />
# rrdtool restore -r file.xml file.rrd.new # This restore xml data in rrd file with a check on value<br />
# to suppress value higher than --maximum you choose</code></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://hints.jeb.be/2008/12/17/counter-reset-problem-with-rrdtool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
