Andrey V. Scopenco wrote: > Hello, > > i have 2 problems with snmptrapd (net-snmp 5.4.2.1 amd64) on FreeBSD 7.1 > release. > > 1. snmptrapd forks very slow. > > root$ time /usr/local/etc/rc.d/snmptrapd start > Starting snmptrapd. > > real 1m15.092s > user 0m0.040s > sys 0m0.049s > > > root$ file /usr/local/sbin/snmpd > /usr/local/sbin/snmpd: ELF 64-bit LSB executable, x86-64, version 1 > (FreeBSD), for FreeBSD 7.1, dynamically linked (uses shared libs), > FreeBSD-style, stripped > > root$ file /usr/local/sbin/snmptrapd > /usr/local/sbin/snmptrapd: ELF 64-bit LSB executable, x86-64, version 1 > (FreeBSD), for FreeBSD 7.1, dynamically linked (uses shared libs), > FreeBSD-style, stripped > > root$ net-snmp-config --configure-options > '--enable-shared' '--enable-internal-md5' '--with-mib-modules= host > disman/event-mib smux mibII/mta_sendmail mibII/tcpTable ucd-snmp/diskio > sctp-mib' '--with-default-snmp-version=2' > '[email protected]' '--with-sys-location=domain.com' > '--with-logfile=/var/log/snmpd.log' > '--with-persistent-directory=/var/net-snmp' '--with-dummy-values' > '--enable-embedded-perl' '--with-perl-modules' '--prefix=/usr/local' > '--mandir=/usr/local/man' '--infodir=/usr/local/info/' > '--build=amd64-portbld-freebsd7.1' 'CC=cc' 'CFLAGS=-O2 > -fno-strict-aliasing -pipe' 'CXXFLAGS=-O2 -fno-strict-aliasing -pipe' > 'CXX=c++' 'LDFLAGS= -rpath=/usr/lib:/usr/local/lib' > 'build_alias=amd64-portbld-freebsd7.1' > > > root$ perl -V > Summary of my perl5 (revision 5 version 8 subversion 9) configuration: > Platform: > osname=freebsd, osvers=7.1-amd64-20090114-releng_7_1, > archname=amd64-freebsd > config_args='-sde -Dprefix=/usr/local > -Darchlib=/usr/local/lib/perl5/5.8.9/mach > -Dprivlib=/usr/local/lib/perl5/5.8.9 > -Dman3dir=/usr/local/lib/perl5/5.8.9/perl/man/man3 > -Dman1dir=/usr/local/man/man1 > -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.9/mach > -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.9 > -Dscriptdir=/usr/local/bin > -Dsiteman3dir=/usr/local/lib/perl5/5.8.9/man/man3 > -Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv > -Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dinc_version_list=none > -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.9/BSDPAN" > -Doptimize=-O2 -fno-strict-aliasing -pipe -Ud_dosuid -Ui_gdbm > -Dusethreads=n -Dusemymalloc=y -Duse64bitint' > hint=recommended, useposix=true, d_sigaction=define > usethreads=undef use5005threads=undef useithreads=undef > usemultiplicity=undef > useperlio=define d_sfio=undef uselargefiles=define usesocks=undef > use64bitint=define use64bitall=define uselongdouble=undef > usemymalloc=y, bincompat5005=undef > Compiler: > cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.9/BSDPAN" > -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe > -I/usr/local/include', > optimize='-O2 -fno-strict-aliasing -pipe', > cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.9/BSDPAN" > -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe > -I/usr/local/include' > ccversion='', gccversion='4.2.1 20070719 [FreeBSD]', gccosandvers='' > intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 > ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', > lseeksize=8 > alignbytes=8, prototype=define > Linker and Libraries: > ld='cc', ldflags =' -Wl,-E -L/usr/local/lib' > libpth=/usr/lib /usr/local/lib > libs=-lgdbm -lm -lcrypt -lutil > perllibs=-lm -lcrypt -lutil > libc=, so=so, useshrplib=true, libperl=libperl.so > gnulibc_version='' > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' > -Wl,-R/usr/local/lib/perl5/5.8.9/mach/CORE' > cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib' > > > Characteristics of this binary (from libperl): > Compile-time options: MYMALLOC PERL_MALLOC_WRAP USE_64_BIT_ALL > USE_64_BIT_INT USE_FAST_STDIO USE_LARGE_FILES > USE_PERLIO > Locally applied patches: > defined-or > Built under freebsd > Compiled at Apr 10 2009 15:48:01 > @INC: > /usr/local/lib/perl5/5.8.9/BSDPAN > /usr/local/lib/perl5/site_perl/5.8.9/mach > /usr/local/lib/perl5/site_perl/5.8.9 > /usr/local/lib/perl5/5.8.9/mach > /usr/local/lib/perl5/5.8.9 > > > 2. no traps. > > root$ cat /etc/rc.conf.d/snmptrapd > snmptrapd_enable="YES" > snmptrapd_flags="-a -p /var/run/snmptrapd.pid" > > root$ cat /usr/local/etc/snmp/snmptrapd.conf > authCommunity log XXXXXXXXX > logOption f /var/log/snmptrapd.log > > > tcpdump shows traps in interface but nothing in logs. > > > ktrace shows: > > 316 snmptrapd RET connect -1 errno 60 Operation timed out > 316 snmptrapd CALL close(0xc) > 316 snmptrapd RET close 0 > 316 snmptrapd CALL gettimeofday(0x7fffffffd740,0) > 316 snmptrapd RET gettimeofday 0 > 316 snmptrapd CALL socket(PF_LOCAL,SOCK_STREAM,0) > 316 snmptrapd RET socket 12/0xc > 316 snmptrapd CALL connect(0xc,0x7fffffffd050,0x6a) > 316 snmptrapd STRU struct sockaddr { AF_LOCAL, /var/agentx/master } > 316 snmptrapd NAMI "/var/agentx/master" > 316 snmptrapd RET connect -1 errno 2 No such file or directory > 316 snmptrapd CALL close(0xc) > 316 snmptrapd RET close 0 > 316 snmptrapd CALL socket(PF_INET,SOCK_STREAM,IPPROTO_IP) > 316 snmptrapd RET socket 12/0xc > 316 snmptrapd CALL connect(0xc,0x7fffffffd0c0,0x10) > 316 snmptrapd STRU struct sockaddr { AF_INET, 0.0.0.0:705 } > > 316 snmptrapd RET connect -1 errno 60 Operation timed out > 316 snmptrapd CALL close(0xc) > 316 snmptrapd RET close 0 > 316 snmptrapd CALL gettimeofday(0x7fffffffd740,0) > 316 snmptrapd RET gettimeofday 0 > 316 snmptrapd CALL socket(PF_LOCAL,SOCK_STREAM,0) > 316 snmptrapd RET socket 12/0xc > 316 snmptrapd CALL connect(0xc,0x7fffffffd050,0x6a) > 316 snmptrapd STRU struct sockaddr { AF_LOCAL, /var/agentx/master } > 316 snmptrapd NAMI "/var/agentx/master" > 316 snmptrapd RET connect -1 errno 2 No such file or directory > 316 snmptrapd CALL close(0xc) > 316 snmptrapd RET close 0 > 316 snmptrapd CALL socket(PF_INET,SOCK_STREAM,IPPROTO_IP) > 316 snmptrapd RET socket 12/0xc > 316 snmptrapd CALL connect(0xc,0x7fffffffd0c0,0x10) > 316 snmptrapd STRU struct sockaddr { AF_INET, 0.0.0.0:705 } > > > > I tested these config files on i386 and it works fine. Seems it > something with amd64. > > Any ideas? > > > Thanks, > -- > Andrey V. Scopenco > http://scopenco.net > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Net-snmp-coders mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/net-snmp-coders > the solution was rebuilding net-snmp with '--disable-snmptrapd-subagent'.
-- Andrey Scopenco http://scopenco.net ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
