Calculate Difference between MAX and MIN

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

Moderators: Developers, Moderators

Post Reply
utopiazz
Posts: 8
Joined: Tue Apr 12, 2005 3:57 am
Location: Sweden

Calculate Difference between MAX and MIN

Post by utopiazz »

I have been fooling around with Cacti for som time and it works fine on my serer. What i do is collecting temperature readings from Dallas/Maxim-IC temperature and counter probes on my heatingsystem.

The only thing i havent found out yet (so far) is how to print the difference between the maximum and minimum values on a graph.

The collected data is counter readings and i want to display a GPRINT with the difference between the starting and ending points on my graph.

http://www.mysite.se/cacti/graph.php?ac ... view_type=

I't should be very simple but i fail to complete this task

/Johan
utopiazz
Posts: 8
Joined: Tue Apr 12, 2005 3:57 am
Location: Sweden

Post by utopiazz »

Was the question to hard to understand ;) or is it not supported to do this kind of calculation with GPRINT. Is it possible to do it some other way im more than willing to try

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

Post by gandalf »

To be honest: I did understand, but I do not know the way to solve.
But here's a workaround:
What about defining the reading not as a GAUGE but as a COUNTER? This will result in a graph showing the increase from interval to interval (see rrdtool docs at http://www.rrdtool.org for a more decent understanding). Then you'll use the Total function described in the later chapters of cacti doc (see Bandwidth Summation at http://www.cacti.net/downloads/docs/html/variables.html)
Reinhard
utopiazz
Posts: 8
Joined: Tue Apr 12, 2005 3:57 am
Location: Sweden

Post by utopiazz »

I have collected the same data as both GAUGE and COUNTER so it would be a pretty easy task to try this since i have all data both ways.

Reagards

/Johan
utopiazz
Posts: 8
Joined: Tue Apr 12, 2005 3:57 am
Location: Sweden

Post by utopiazz »

Well, the TOTAL was pretty easy to test but it didn't solve my issue.

The data i have is collected from a MaximIC pulse counter. The data is collected every 2minutes.
Every pulse i count represent 5 liters of water. To present that on the graph in cubic meters i have a CDEF that transforms the COUNT value to m3.

And since the SUM funktion can't use any CDEF i only get the total number of pulses counted over the period and not cubic meters.

/Johan
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest