{"id":1210,"date":"2009-04-15T00:00:00","date_gmt":"2009-04-14T22:00:00","guid":{"rendered":"https:\/\/wwwneu.strehle.de\/tim\/weblog\/archives\/2009\/04\/15\/1148\/"},"modified":"2009-04-15T00:00:00","modified_gmt":"2009-04-14T22:00:00","slug":"1148","status":"publish","type":"post","link":"https:\/\/www.strehle.de\/tim\/weblog\/archives\/2009\/04\/15\/1148\/","title":{"rendered":"rrdtool"},"content":{"rendered":"<p>I keep forgetting how to get started with the wonderful <a href=\"http:\/\/oss.oetiker.ch\/rrdtool\/index.en.html\">rrdtool<\/a>, so here&#8217;s a note to myself for the next time (and here&#8217;s the <a href=\"http:\/\/oss.oetiker.ch\/rrdtool\/tut\/rrdtutorial.en.html\">tutorial<\/a>)\u2026<\/p>\n<p>I&#8217;m creating a database with these characteristics:<\/p>\n<ul>\n<li>a single, once every 10 minute measured gauge named &#8222;num&#8220; which is OK with up to 20 minute gaps between values<\/li>\n<li>10 minute resolution stored for one week<\/li>\n<li>1 hour resolution for one month<\/li>\n<li>1 day resolution for three years<\/li>\n<\/ul>\n<p>rrdtool create counter.rrd &#8211;step 600 DS:num:GAUGE:1200:0:U RRA:LAST:0.5:1:1008 RRA:AVERAGE:0.5:6:744 RRA:AVERAGE:0.5:144:1095<\/p>\n<p>Inserting the current value:<\/p>\n<p>rrdtool update counter.rrd N:<code>echo 'select count(JOB\\_ID) from DCX\\_JOB where JOB\\_STATUS = 1;' | mysql -h localhost -P 3306 -u username -psecret dbname -s<\/code><\/p>\n<p>Creating a graph as a PNG file:<\/p>\n<p>rrdtool graph counter.png DEF:val=counter.rrd:num:LAST LINE2:val#FF0000<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I keep forgetting how to get started with the wonderful rrdtool, so here&#8217;s a note to myself for the next time (and here&#8217;s the tutorial)\u2026 I&#8217;m creating a database with these characteristics: a single, once every 10 minute measured gauge named &#8222;num&#8220; which is OK with up to 20 minute gaps between values 10 minute [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_share_on_mastodon":"0"},"categories":[1],"tags":[],"class_list":["post-1210","post","type-post","status-publish","format-standard","hentry","category-weblog"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/posts\/1210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/comments?post=1210"}],"version-history":[{"count":0,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/posts\/1210\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/media?parent=1210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/categories?post=1210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/tags?post=1210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}