Maths on 2 values

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

Moderators: Developers, Moderators

Post Reply
Guest

Maths on 2 values

Post by Guest »

hello,

I have 2 values I want to plot, with a 3rd being a multiplier for one of the values.

Drive Space Total
Drive allocation unit size
Drive space used

I want drive space total * allocation unit size as a line on a graph

and

Drive space used * allocation unit size as a area.

How do I do the math on those, these values are all retrieved via SNMP and go into datasources, from what I can tell I cant just have a simple generic CDEF that will take 2 values from 2 varying datasources and multiply them.

While typing this I though I could ofcource put allocation units and total in a rra and used and units in a rra and try and multiple inside the rra, but I havnt tried that.

any pointers?
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Sure you can! :wink:

Let's assume the following names:

Drive Space Total = drive_space_total
Drive allocation unit size = drive_alloc_unit
Drive space used = drive_space_used

To do:

space total * allocation unit size

Create a CDEF with and add the following items (in order)

1. drive_space_used (data source)
2. drive_alloc_unit (data source)
3. * (function)

Than add that CDEF as a line on your graph (making sure those two data sources are used elsewhere on that graph).

The: "Drive space used * allocation unit size" should work the same way as above.

Feel free to ask if you have any further questions.

-Ian
Guest

Post by Guest »

hey,

thats one way yes, and I am currently doing that, however I was looking for a more generic way, since I need to graph quite a few machines this is a lot of CDEFs ;)

something simular to the "use current datasource" option, but for 2 datasources
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests