Re: Doing math on multiple datasources and graphing result (fwd)

"Richman, Marc" <[email protected]> Fri, 11 Jan 2008 17:26:18 -0500
Newsgroups gmane.network.cricket.user
Message-ID <[email protected]>
It's the missing exponentiation operator I mentioned in my previous
post.
Did that mail not make it to the list?

It looked like this:
It would be nice if the documentation
http://cricket.sourceforge.net/support/doc/reference.html had a section
on COMPUTE under rrd-ds-type, there is a mention of it in the PERFMON
section,

Also I think the RPN is missing an exponentiation operator, also not
listed in the docs, perhaps it is "**"?
Anyone know? 

I wish I had known about this when I wrote my NetApp config script

			Marc


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Clarke
Morledge
Sent: Friday, January 11, 2008 5:18 PM
To: [email protected]
Subject: Re: [cricket-users] Doing math on multiple datasources and
graphing result (fwd)

Paolo,

Thanks for your help.  Unfortunately, I hit another road block when
trying 
to implement the sample configuration.  Here's the error that shows in
the 
collector debug:

Cannot update /home/cricket/cricket-data/temp/test.rrd: RPN final stack 
size != 1

I'm not sure why the RPN calculation fails to return just one item on
the 
stack.   It looks like mystery-mystery RRD stuff, but I haven't haven't 
been able to find out where and how to debug it.

Does anyone have any suggestions?

Clarke Morledge
College of William and Mary
Information Technology - Network Engineering
Jones Hall (Room 18)
Williamsburg VA 23187


-------------------------------------------
Date: Thu, 10 Jan 2008 08:53:05 +0100
From: Paolo Cesare BERVA <[email protected]>
To: Clarke Morledge <[email protected]>
Cc: [email protected]
Subject: Re: [cricket-users] Doing math on multiple datasources and
graphing
     result

Clarke Morledge wrote:
> I am trying to figure out if Cricket can do some math on multiple 
> datasources and somehow graph the result along with other datasources
in a 
> single graph.
> 
> Let's say part of my config file looks like this:
> 
> datasource      linkByteCount
>          ds-source   =   snmp://%snmp%/linkByteCount.%inst%
>  	desc        =   "Lower 32 bits of byte count"
> 
> datasource      linkByteCountHi
>          ds-source   =   snmp://%snmp%/linkByteCountHi.%inst%
>          desc        =   "Upper 32 bits of byte count"
> 
> datasource      linkReTxByteCount
>          ds-source   =   snmp://%snmp%/linkReTxByteCount.%inst%
>          desc        =   "Retransmitted Bytes"
> 
> Basically, instead of giving me a single 64-bit counter for "byte
count", 
> the vendor decides to give me only two, 32-bit SNMP mib variables that
I 
> must combine together to form the 64-bit value.
> 
> Ideally, what I'd like to do is something like this in Reverse Polish 
> Notation (RPN):
> 
> ByteCount = linkByteCountHi,2,32,*,linkByteCount,+
> 
> and then create a targetType:
> 
> targetType      databytes
>    ds  =  "ByteCount, linkReTxByteCount"
>    view  =  "Bytes: ByteCount linkReTxByteCount"
> 
> and then graph a target with it.  Unfortunately, I am unable to figure
out 
> how to combine two datasources together with the extra math to create
a new 
> datasource to make this happen.
> 
> I would settle for some RPN work using either "mtargets" or using
"scale" on 
> the graph, but I haven't been able come up with anything useful.
> 
> I could do this with the ds-source that uses EXEC to call a script
that 
> collects the SNMP values for me and then does the math to create a new
ds, 
> but it would be a whole lot cleaner if I can do it all inside of
Cricket and 
> not have to mess with an external script.
> 
> Does anyone have any suggestions?
> 
> Thanks.
> 
> Clarke Morledge
> College of William and Mary
> Information Technology - Network Engineering
> Jones Hall (Room 18)
> Williamsburg VA 23187
> 
Hi Clarke,
I think you are looking for something like rrd-ds-type = COMPUTE
You can find it documented in file CHANGES of cricket 1.0.5 tarball.

In the specific case:

datasource ByteCount
         rrd-ds-type = COMPUTE
         rrd-cdef    = ds1,2,32,*,ds0,+

targetType      databytes
#               ds0             ds1            ds2          ds3
     ds  =  "linkByteCount,linkByteCountHi,ByteCount,linkReTxByteCount"
     view  =  "Bytes: ByteCount linkReTxByteCount"

Regards
Paolo

------------------------------------------------------------------------
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketp
lace
_______________________________________________
cricket-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cricket-users

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace