Networking Open Source Software

Remove Spikes From RRDtool Graphs

I use RRDtool to make graphs on various things I monitor like server stats, network stats and it does a relatively good job. My one (big) complaint is that when you restart you occasionally see these gigantic spikes that completely mess up the data. I’ve even seen spikes larger than what the system can technically handle.

Nobody mentioned there’s a script (download) that will remove these outliers from your rrds. I put together a quick shell script to make it quick for when I need to run it again:

for i in /path/to/graphs/rrd/*;
        perl $i;

If you have a ton of graphs a quick shell script to iterate through the directly may be quicker. If you only have a handful like me, no big deal.

Keep the script around for the next time you have spikes to deal with.

3 replies on “Remove Spikes From RRDtool Graphs”

i have been using this script for a while, and now it stoped working
i have changed the rrd server to a 64bit os and i think thats when it stoped, any idea how to make it work again?

I have just experienced the same broken behavior. We just updated to 64bit architecture and now my utility script is no longer working. My search now continues to find a fix or alternative, unless someone has a quick answer for me!?

For anyone else that runs across this problem, the regex needs to be corrected because the 64bit versions do not have leading/trailing spaces around the values.


if (/\s\d\.\d+e.(\d+)\s/)
if (/\s*\d\.\d+e.(\d+)\s*/)


if ( $dump[$lino]=~/\d\.\d+e.(\d+)\s/ )


if ( $dump[$lino]=~/\d\.\d+e.(\d+)\s*/ )

Hope it helps!

Leave a Reply

Your email address will not be published. Required fields are marked *