[Nagiosplug-devel] Re: check_by_ssh patch
Justin Ellison
justin at techadvise.com
Wed Mar 31 10:21:23 CEST 2004
On Wed, 2004-03-31 at 11:07, Andreas Ericsson wrote:
> > It depends very much on what you're doing with it. For number-crunching
> > it is slower, for uses where it runs, does a few things, then terminates
> > then the difference can be a lot smaller.
> >
> Datacrunching in general. check_ifoperstatus runs in 6 seconds real time
> whereas a shellscript checking multiple interfaces at the same time runs
> in 1 second.
Ouch! I'm not getting into the C vs Perl argument, but you have
something not right if things run that slow. I am querying a remote
system 15 routers away from my Nag box:
[root at www nagios]# time /usr/lib/nagios/plugins/check_ifoperstatus -k 2
-H cmgw.mydomain.com -C mycomm
WARNING: Interface FastEthernet1/0 (index 2) is administratively down.
real 0m0.375s
user 0m0.270s
sys 0m0.010s
[root at www nagios]# time /usr/lib/nagios/plugins/check_ifstatus -H
cmgw.mydomain.com -C mycom -v2
OK: host 'cmgw.mydomain.com', interfaces up: 10, down: 0, dormant: 0
real 0m0.842s
user 0m0.300s
sys 0m0.090s
Just walking the ifDescr table in bash takes longer:
[root at www nagios]# time snmpwalk -v2c -c mycom cmgw.mydomain.com ifDescr
IF-MIB::ifDescr.1 = STRING: FastEthernet0/0
IF-MIB::ifDescr.2 = STRING: FastEthernet1/0
IF-MIB::ifDescr.3 = STRING: Cable3/0
IF-MIB::ifDescr.4 = STRING: Cable3/0-upstream0
IF-MIB::ifDescr.5 = STRING: Cable3/0-upstream1
IF-MIB::ifDescr.6 = STRING: Cable3/0-upstream2
IF-MIB::ifDescr.7 = STRING: Cable3/0-upstream3
IF-MIB::ifDescr.8 = STRING: Cable3/0-upstream4
IF-MIB::ifDescr.9 = STRING: Cable3/0-upstream5
IF-MIB::ifDescr.10 = STRING: Cable3/0-downstream
IF-MIB::ifDescr.11 = STRING: Null0
real 0m1.535s
user 0m0.100s
sys 0m0.030s
--
Justin Ellison <justin at techadvise.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://nagios-plugins.org/archive/devel/attachments/20040331/a8372ea7/attachment.sig>
More information about the Devel
mailing list