All,

I have a moderately loaded Nagios server, and a home-brew 'environmental 
healthcheck' plugin.  This plugin walks a table, checks a user-supplied 
column, and returns data based on that column.  For example, pointed at 
IF-MIB::ifTable and given 'ifOperStatus' and a hash, it could return 
'OK' for 'up', 'WARN' for 'testing' and 'CRIT' for 'down'.

The plugin takes around 0.5s of CPU time in total when measured with 
'perl -d:DProf'.  There are 36 calls to SNMP::init_snmp, which seems 
like a heck of a lot, and it's taking up 80% of CPU time.  A bare-bones 
test script only calls init_snmp three times.

The issue I'm up against is that when multiple copies of this plugin 
run, they take increasingly longer (up to 6-7 seconds) to return any 
data, whereas a plugin that uses Net::SNMP (the 'other' perl module) is 
much quicker.  I could re-code my plugin, but I'd rather stick to 
Net-SNMP as I've done for the past decade.

Can anyone help?  The code is at 
http://stash.poggs.com/check-environment.pl and will be there for a week 
or two.

Cheers


Peter


------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to