Help to divide two independent graphs-Rate(Division)
Moderators: Developers, Moderators
Help to divide two independent graphs-Rate(Division)
Hi everybody,
I am working on a project, and I want to divide the result of two independent graphs(OID) from the same node in order to find the rate. I try to create a CDEF but it did NOT work.
I was able to add the two graphs but NOT divide them.
Any suggestions?
Can you please tell me how to achieve it?
Thanks in advance!
http://www.blwebhosting.com.cy/
I am working on a project, and I want to divide the result of two independent graphs(OID) from the same node in order to find the rate. I try to create a CDEF but it did NOT work.
I was able to add the two graphs but NOT divide them.
Any suggestions?
Can you please tell me how to achieve it?
Thanks in advance!
http://www.blwebhosting.com.cy/
Last edited by tkis on Wed Sep 09, 2009 8:50 am, edited 1 time in total.
Rate of two graphs
Hi,
the rrdtool graph statement for that graph from Graph Management says:
ERROR: invalid rpn expression in : 100, / , 100
Thanks in advance
http://www.blwebhosting.com.cy/
the rrdtool graph statement for that graph from Graph Management says:
ERROR: invalid rpn expression in : 100, / , 100
Thanks in advance
http://www.blwebhosting.com.cy/
Last edited by tkis on Wed Sep 09, 2009 8:50 am, edited 1 time in total.
Sorry for misunderstanding. Below is the rrdtool graph statement that you request.
Thanks in advance.
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="Rate" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
DEF:a="/srv/www/htdocs/cacti-0.8.6i/rra/test_1_snmp_oid_198.rrd":snmp_oid:AVERAGE \
DEF:b="/srv/www/htdocs/cacti-0.8.6i/rra/test_1_snmp_oid_211.rrd":snmp_oid:AVERAGE \
CDEF:cdefc=100,/,100 \
LINE1:a#FF4105:"" \
LINE1:b#CCBB00:"" \
LINE3:cdefc#000000:""
RRDTool Says:
ERROR: invalid rpn expression in: 100,/,100
http://www.blwebhosting.com.cy/
Thanks in advance.
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="Rate" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
DEF:a="/srv/www/htdocs/cacti-0.8.6i/rra/test_1_snmp_oid_198.rrd":snmp_oid:AVERAGE \
DEF:b="/srv/www/htdocs/cacti-0.8.6i/rra/test_1_snmp_oid_211.rrd":snmp_oid:AVERAGE \
CDEF:cdefc=100,/,100 \
LINE1:a#FF4105:"" \
LINE1:b#CCBB00:"" \
LINE3:cdefc#000000:""
RRDTool Says:
ERROR: invalid rpn expression in: 100,/,100
http://www.blwebhosting.com.cy/
Last edited by tkis on Wed Sep 09, 2009 8:54 am, edited 1 time in total.
Hi Reinhard,
The task that I am try to accomplish is to divide two values from two different graphs in order to find their rate.
In other words, I want to divide the values 98005 / 101219 and create a new graph shown the result. See graphs below.
Thanks in advance.
The task that I am try to accomplish is to divide two values from two different graphs in order to find their rate.
In other words, I want to divide the values 98005 / 101219 and create a new graph shown the result. See graphs below.
Thanks in advance.
- Attachments
-
- graph_2.GIF (10.96 KiB) Viewed 1989 times
-
- graph_1.GIF (11.07 KiB) Viewed 1989 times
Hello again Reinhard,
I manage to create the devision graph but again the result of the division is wrong because i cannot create a CDEF that can divide two different graphs. The result of the division is 1 because i devide the graph with itself.(cdefe=b,b,/ ) See attachment.
How can i remove a "b" and add "a" ?
Can you please outline step by step how can achive that from the graphical inetrface?
Thanks in advance.
I manage to create the devision graph but again the result of the division is wrong because i cannot create a CDEF that can divide two different graphs. The result of the division is 1 because i devide the graph with itself.(cdefe=b,b,/ ) See attachment.
How can i remove a "b" and add "a" ?
Can you please outline step by step how can achive that from the graphical inetrface?
Thanks in advance.
- Attachments
-
- graph_to1rrdfile.txt
- (642 Bytes) Downloaded 105 times
-
- graph_to1.GIF (10.2 KiB) Viewed 1953 times
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Well, perhaps I was not plain enough.tkis wrote:Hello again Reinhard,
I manage to create the devision graph but again the result of the division is wrong because i cannot create a CDEF that can divide two different graphs. The result of the division is 1 because i devide the graph with itself.(cdefe=b,b,/ ) See attachment.
Please create a new CDEF. Provide a nice name. Add a new CDEF item, type is CUSTOM. Enter the string a,b,/ and save.
Then, visit your Graph Template. Select the Graph Item that shall graph the result of the math (if not yet in place, add a new graph item). Associate a data source of NONE, LINE1, a nice color, AVERAGE and your new CDEF. Provide some text for the legend.
That's it
Reinhard
Reinhard,
Finally, I manage to do it!
Many thanks for your helpful comments and support.
Thanks,
tkis
http://www.blwebhosting.com.cy/
Finally, I manage to do it!
Many thanks for your helpful comments and support.
Thanks,
tkis
http://www.blwebhosting.com.cy/
Re: Help to divide two independent graphs-Rate(Division)
Hello,
We are trying to create a graph which should represent the result of division of two independent graphs. Namely, both are aggregated graphs (not bound to any host). The first graph represents interface traffic (interface traffic-bits/sec template) and the second one number of sessions (generic OID template). We need to get a graph which represents average bandwidth per session (in bits/sec).
We already created CDEF (cdef=a,b,/). Now we need help with graph creation (graph template, etc.), because it's not clear how to get to the point where we are asked which graphs to divide...
Thanks in advance.
BR
We are trying to create a graph which should represent the result of division of two independent graphs. Namely, both are aggregated graphs (not bound to any host). The first graph represents interface traffic (interface traffic-bits/sec template) and the second one number of sessions (generic OID template). We need to get a graph which represents average bandwidth per session (in bits/sec).
We already created CDEF (cdef=a,b,/). Now we need help with graph creation (graph template, etc.), because it's not clear how to get to the point where we are asked which graphs to divide...
Thanks in advance.
BR
Who is online
Users browsing this forum: No registered users and 1 guest