On Tue, Jan 13, 2004 at 02:28:13PM +0100, Emiliano Panella wrote: > Hello > I 've to calcolate the following expression with the mrtg grapher for input > errors and output errors: > ( ifInErrors/ ifInUcastPkts + ifInNUcastPkts ) * 100 > ( ifOutErrors/ ifOutUcastPkts + ifOutNUcastPkts ) * 100
Substitute variables to simplify: ( a / b + c ) * 100 for input (before &) ( d / e + f ) * 100 for output (after &) > I use the following sintax: > Target[err_2]:ifInErrors.2&ifOutErrors:[EMAIL PROTECTED] * 100 / > ifInUcastPkts.2&ifOutUcastPkts.2:[EMAIL PROTECTED] + > ifInNUcastPkts.2&ifOutNUcastPkts.2:[EMAIL PROTECTED] a&d * 100 / b&e + c&f which is a * 100 / b + c for input d * 100 / e + f for output This is not the same > Another question: > can I use also the parenthesis in the expression? I think you can. Use plenty of whitespace. If you can't, rewrite the expression: (a / b + c ) * 100 = 100 * a / 100 * b + 100 * c However, you probably want a / (b + c) * 100 to get a percentage of errors in relation to unicasts+broadcasts. HTH Alex -- begin sig http://www.googlism.com/index.htm?ism=alex+van+den+bogaerdt&type=1 This message was produced without any <iframe tags -- Unsubscribe mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/mrtg FAQ http://faq.mrtg.org Homepage http://www.mrtg.org WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
