I've got an RRDtool graph that has a huge spike after a reboot. I've tried using the popular removespikes.pl script on it, but just returns a "No peaks found.!". What's the best way to take care of this?

  • I've now seen that you already tried removespikes.pl, so I edited my answer. Try to use it with -t, this should solve your problem. Hope it helps. – Marco Ramos Apr 27 '11 at 19:40
  • I updated removespikes to work with recent changes in rrd xml format gist.github.com/1132437 – valodzka Aug 8 '11 at 18:56

I'd recommend this perl script, which is available on the rrdtool contrib page itself. I've used it the past and it works fine. It automatically removes the spikes and it even does a backup of the .rrd file :)

Quoting the README file:

README for removespikes.pl

This version of removespikes.pl is based on Vins Vilaplana and Humberto Rossetti Baptistas code.

I have added value-based chopping (-t value), an analysis-only mode (-a), control of verbose/debug output (-d/-v), a help option (-h) and some code cleanup.

removespikes>./removespikes.pl -h REMOVESPIKES: Remove spikes from RRDtool databases.

Usage: ./removespikes.pl -d -a [-l number] [-t maxval] name_of_database

Where: -d enables debug messages
-a runs only the analysis phase of the script
-h prints this message
-l sets the % limit of spikes bin-based chopping (default: 0.6)
-t sets the value above which records are chopped. Disabled by default. Enabling value-based chopping will disable bin-based chopping.

-v Verbose mode. Shows some information name_of_database is the rrd file to be treated.



EDIT: I've now seen that you already tried removespikes.pl but you got "no peaks found". Try to use it with -t flag, this should solve your problem.

  • Tried -t with all sorts of values, no luck. – raccettura Apr 27 '11 at 19:49
  • you can tweak -l as well for bin based chopping. – Marco Ramos Apr 27 '11 at 20:06

My normal answer is "You can't edit RRD files." or "You have to use rrdtool to dump it, edit the dump and restore it - that's too much work!", but you seem like a nice guy so I'll point you at rrdEditor :-)


Wanted to reply to the answer above for removespikes.pl -- the linked version misses the -t option. I found the one that does support it here: http://rrdtool.cs.pu.edu.tw/pub/contrib/removespikes-20080226-mkn.tar.gz


I've solved it another way: compute the 95 percentile of the data, then apply this to the max height of graph. So you keep your spikes, but you end up with much useful graphs, even without spikes. But it needs some more computing before creating the graph. I can post a gist with PHP code that does it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.