[rrd-users] Re: increase performance

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Thu Aug 23 00:03:49 MEST 2001


Mike Wright wrote:

> As for SNMPwalk vs SNMPget, they create the exactly same amount of traffic.
> All snmpwalk does is do multiple snmpgetnext requests until it reaches the
> end of the mib. So doing 10 snmpgets to retrieve ifInOctets for 10
> interfaces is just the same as doing snmpwalk ifInOctets and they will take
> the same amount of time. (Using SNMPv1 anyway).

So, doing an snmpwalk on all interfaces and then processing the result
on the monitoring box (for instance, using 10 out of 20 values) is not
efficient at all, except that the monitoring box can do its work a bit
quicker.

> >I find that loading (/starting/whatever) perl uses many resources.
> >Having a daemon that is started once and keeps running is much better
> >(IMHO) than starting it every 5 minutes from cron.  Alternately you
> >can fetch data without using perl.
> 
> Definately true. [...]
> Starting a new perl process every 5 minutes is no overhead, starting
> multiple snmpget shell commands using back ticks is.

I agree on the backticks, however you seem to both agree and disagree
with me on starting perl.

Loading all the modules, such as SNMP_util and friends, together with
perl itself does impact the machine.  I'm not talking a modern machine
here, I'm talking home machine with 4 years of uptime.

> Also, you don't mention how you are getting the data into RRDtool. Do you
> run `rrdtool update` in back ticks too? This will also have an even bigger
> overhead. You should be using the "RRDs" module.

Nah,  I usually do it quick and dirty:

snmpget host public 2.2.1.10.2 2.2.1.16.2 | \
   awk 'BEGIN{i=o="U"};/ifIn/{i=$3};/ifOut/{o=$3};END{print "N:"i":"o} | \
   xargs rrdupdate my.rrd

Variants on this are also possible: the print command becomes something
like {print "update router1.rrd N:"i":"o} and several of these quickies
go into one script.  This script can then be run as follows:

collector | rrdtool -

cheers,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list