RRDTool Help

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
icewalker
Posts: 42
Joined: Tue Sep 09, 2008 2:18 pm

RRDTool Help

Post by icewalker »

I've been playing with scripts and WMI to gather the raw cpu data from several windows systems. Things are going really well and the graphs are working perfectly, except that I have seen two spikes (like way above 100%) in recent days.

The first spike I had no data for. The second spike happened on a system I had to be working on. And I just happened to have rebooted that system at about the time of the spike. Because I didn't know where these spikes were coming from, I was also gathering the raw data outside of the rra files into a log so I could compare the next time I saw the spike.

This is what I have.

rrdtool fetch r0b-stat02_cpuraw_92.rrd AVERAGE -r 60 -s -1h

Code: Select all

1225287180: 2.4500000000e-01
1225287240: 4.5529661017e-01
1225287300: 1.7216673420e+07
1225287360: 1.7216673420e+07
1225287420: 1.7216673420e+07
1225287480: 1.7216673420e+07
1225287540: 2.6715679562e+06
1225287600: 4.9183333333e+00
1225287660: 1.0608333333e+00
Notice the entries in the +07 range. That is the spike. Here is the raw data that I collected. The time scales will be slighly off due to how rrdtool operates and the fact that I have a lot of systems being monitored (usally about 8-9 seconds off).

RAW NUMBERS

Code: Select all

datetime|Name|PercentDPCTime|PercentIdleTime|PercentInterruptTime|PercentPrivilegedTime|PercentProcessorTime|PercentUserTime
1225287189|_Total|1218125000|1484144296875|2700937500|25959453125|1484144296875|237563046875
1225287248|_Total|1218125000|1484733281250|2701093750|25960468750|1484733281250|237564765625
1225287489|_Total|390625|752421875|1953125|175000000|752421875|15859375
1225287549|_Total|703125|1217500000|3437500|216328125|1217500000|79921875
1225287609|_Total|1093750|1800937500|3984375|225234375|1800937500|85859375
1225287669|_Total|1171875|2399687500|4609375|228515625|2399687500|86640625
As you can see, the counters reset due to the reboot.

Basically, the rra data is just a calculation using the raw data from WMI. Because Windows does 10,000,000 ticks per second, I have do the math to compensate (ie translate to a scale of 100 ticks per second), which is pretty easy. And then I just round it off when I output for Cacti.

But as you can tell, there is a gap of about 2-3 minutes in the raw numbers. So I'm wondering how the rra had data inserted into it when there is no data being collected. I would have hoped that CACTI would have just inserted a 0 if there was no data collected and sent back to it.

Do I need to check for the failed connection and just supply a 0 myself? Does cacti do something similar with it's snmp code that it is able to compensate when it can't connect?

Any thoughts? Has anybody else ran into something similar?

Thanks, James
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: RRDTool Help

Post by gandalf »

icewalker wrote:But as you can tell, there is a gap of about 2-3 minutes in the raw numbers. So I'm wondering how the rra had data inserted into it when there is no data being collected. I would have hoped that CACTI would have just inserted a 0 if there was no data collected and sent back to it.

Do I need to check for the failed connection and just supply a 0 myself? Does cacti do something similar with it's snmp code that it is able to compensate when it can't connect?

Any thoughts? Has anybody else ran into something similar?

Thanks, James
You managed to find the meaning of some interesting rrdtool parameters, especially heartbeat
heartbeat defines the maximum number of seconds that may pass between
two updates of this data source before the value of the data source is
assumed to be *UNKNOWN*.
I bet your heartbeat is still defined as 600. You may want to use e.g. 90 to avoid any "automatic gap filling" when using 60 sec step size
Reinhard
icewalker
Posts: 42
Joined: Tue Sep 09, 2008 2:18 pm

Post by icewalker »

I bet your heartbeat is still defined as 600. You may want to use e.g. 90 to avoid any "automatic gap filling" when using 60 sec step size
Reinhard
That sounds like an idea. So, is this a cacti setting? I can't find it! Just need a hint. Thanks

James
icewalker
Posts: 42
Joined: Tue Sep 09, 2008 2:18 pm

Post by icewalker »

Never mind, finally found it.

Thanks for the help. I'll test it this afternoon and let you know how it goes.

James
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests