net-snmp-5.7.3 snmptrapd issues in hpux

Dixon Xavier <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAF9ohvSt9xYNepeDh1XEp_ZFWvua7=qXUCuFKBEOXnOe=AnA8A@mail.gmail.com>
Hi,

I successfully compiled net-snmp-5.7.3 for HP-UX ia64.
configure script was:
'--with-default-snmp-version=3' '--enable-ipv6'
'--with-logfile=/var/tmp' '--with-persistent-directory=/var/tmp'
'--with-perl-modules=no' '--enable-embedded-perl=no'
'--with-openssl=/home/dixon/HPUX11.23_IPF64/release'
'--enable-static=yes' '--enable-shared=no'
'--prefix=/home/dixon/buildoutput_hpuxia64' 'CC=cc +DD64'
'CFLAGS=+DD64'

But i am not able to get snmptrapd working.

snmptrapd is not processing traps at all.

I suspect the fd_set returned by snmp_select_info is corrupted somehow:


I added further debug lines in apps/snmptrapd.c

@@ -587,7 +587,17 @@
         tvp = &timeout;
         timerclear(tvp);
         tvp->tv_sec = 5;
+
+        DEBUGMSGTL(("snmptrapd:", "before snmp_select_info
numfds=%d", numfds));
         snmp_select_info(&numfds, &readfds, tvp, &block);
+        DEBUGMSGTL(("snmptrapd:", "after snmp_select_info numfds=%d", numfds));
+       for(int i=0;i<FD_SETSIZE;i++)
+       {
+               if (FD_ISSET(i, &readfds))
+                       DEBUGMSGTL(("snmptrapd:", "fd %d is set", i));
+       }
+
+
         if (block == 1)
             tvp = NULL;         /* block without timeout */
 #ifndef NETSNMP_FEATURE_REMOVE_FD_EVENT_MANAGER


When i run snmptrapd as:
./snmptrapd -f -D all -Lo

...
snmptrapd:: before snmp_select_info numfds=0trace:
snmp_sess_select_info2_flags(): snmp_api.c, 6046:
sess_select: for all sessions: 7 5 3
sess_select: next alarm at 1431378290.330218 sec
verbose:sess_select: timer due in 4.359099 sec
verbose:sess_select: setting timer to 4.359099 sec, clear block (was 0)
trace: snmptrapd_main_loop(): snmptrapd.c, 593:
snmptrapd:: after snmp_select_info numfds=8trace:
snmptrapd_main_loop(): snmptrapd.c, 597:
snmptrapd:: fd 35 is settrace: snmptrapd_main_loop(): snmptrapd.c, 597:
snmptrapd:: fd 37 is settrace: snmptrapd_main_loop(): snmptrapd.c, 597:
...

Note:
sess_select: for all sessions: 7 5 3

snmptrapd:: fd 35 is set
snmptrapd:: fd 37 is set

Also lsof shows:
# lsof -i :162
COMMAND    PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
snmptrapd 3893 root    7u  IPv4 0xe0000001be315380      0t0  UDP
*:snmp-trap (Idle)


Therefore, at select, it waits for wrong fds and ended up not
receiving any traps ?

Thanks in advance..

Regards,
Dixon Xavier

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.