Displaying relative value instead of absolute value in graph

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

Moderators: Developers, Moderators

Post Reply
RedShift
Posts: 5
Joined: Sun Jan 07, 2007 6:06 pm

Displaying relative value instead of absolute value in graph

Post by RedShift »

Hi all,

I've got a script get a formatted output from

/proc/diskstats

These counters keep adding up untill the 32bit counter overflows and starts from zero again. Cacti is sampling the data etc, I can plot it into a graph etc... but the graph displays the actual value. So it displays the total number of sectors read/writen at that time. But I want to analyze how busy the disk is, so I need it to display the difference from the previous sample.

So let's say,

15:50
Counter is at 100 sectors, cacti registers 100 sectors
15:55
Counter is at 175 sectors, cacti registers 175 sectors.

Now when I graph this information, it would display 100 at 15:50 and 175 at 15:55. But I want it to display 75 at 15:55, like the counter was reset at the time the sampling was done.

It's similar to traffic graphing calculating the incoming/outgoing bandwith at a single point in time. I've spent the better part of the evening looking at the defaults included with cacti but I can't find the difference between a "traffic" graph and a "regular" graph.

Thanks,

Glenn
juvann
Posts: 20
Joined: Mon Dec 18, 2006 4:04 am

Post by juvann »

Which is the Data Source Type? In traffic graph the data source type are counter.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This is the correct hint. Change ds type from GAUGE to COUNTER in the data template and in all rrd files using rrdtool tune. Then rrdtool will perform the calculation for you
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests