snmptrapd cpu usage on solaris when disconnected from pty.

This is a discussion on snmptrapd cpu usage on solaris when disconnected from pty. within the SNMP Users forums, part of the Networking and Network Related category; All I've got a wierd one. I'm running snmptrapd 5.3.01 on a solaris 9 box. When ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2006
Jayson Robinson
 
Posts: n/a
Default snmptrapd cpu usage on solaris when disconnected from pty.

All I've got a wierd one.

I'm running snmptrapd 5.3.01 on a solaris 9 box. When I run from the
command line and use the -f option I see less then 1% cpu usage. Whenever I
call the snmptrapd from the startup script (and it's using the same exact
options) cpu goes way up: ps output shows time on proc steadily going up in
1 second increments with a 1 second sleep loop.

From the startup script:

root 1041 1 2 15:01:05 ? 0:01 /opt/net-snmp/sbin/snmptrapd
<cmdline>
root 1041 1 4 15:01:05 ? 0:02 /opt/net-snmp/sbin/snmptrapd -C
-c
root 1041 1 6 15:01:05 ? 0:02 /opt/net-snmp/sbin/snmptrapd -C
-c
root 1041 1 8 15:01:05 ? 0:04 /opt/net-snmp/sbin/snmptrapd -C
-c
root 1041 1 10 15:01:05 ? 0:05 /opt/net-snmp/sbin/snmptrapd -C
-c
root 1041 1 11 15:01:05 ? 0:05 /opt/net-snmp/sbin/snmptrapd -C
-c
root 1041 1 11 15:01:05 ? 0:06 /opt/net-snmp/sbin/snmptrapd -C
-c
root 1041 1 13 15:01:05 ? 0:07 /opt/net-snmp/sbin/snmptrapd -C
-c

From the command line with the exact same options:

root 9257 9256 1 15:15:48 pts/6 0:00 /opt/net-snmp/sbin/snmptrapd
-C -c
root 9257 9256 1 15:15:48 pts/6 0:00 /opt/net-snmp/sbin/snmptrapd
-C -c
root 9257 9256 1 15:15:48 pts/6 0:00 /opt/net-snmp/sbin/snmptrapd
-C -c
root 9257 9256 1 15:15:48 pts/6 0:00 /opt/net-snmp/sbin/snmptrapd
-C -c
root 9257 9256 1 15:15:48 pts/6 0:00 /opt/net-snmp/sbin/snmptrapd
-C -c
root 9257 9256 1 15:15:48 pts/6 0:00 /opt/net-snmp/sbin/snmptrapd
-C -c
root 9257 9256 1 15:15:48 pts/6 0:00 /opt/net-snmp/sbin/snmptrapd
-C -c
root 9257 9256 1 15:15:48 pts/6 0:00 /opt/net-snmp/sbin/snmptrapd
-C -c
root 9257 9256 1 15:15:48 pts/6 0:00 /opt/net-snmp/sbin/snmptrapd
-C -c

the complete command line:
/opt/net-snmp/sbin/snmptrapd -C -c /opt/net-snmp/share/snmp/snmptrapd.conf
-a -OQ -t -n -p /var/snmp/snmptrapd.pid -f

If I leave off the -f and it disconnects from the calling shell it will also
increment time on the processor. Both of the trap daemons are running and
are giving me the appropriate traps just the one that has to be used is
eating up a lot of processor time.

If I add a -Dtrace to the command line, the one with the -f option seems to
move through:
NET-SNMP version 5.3
trace: netsnmp_tdomain_transport(): snmp_transport.c, 350:
trace: netsnmp_tdomain_transport(): snmp_transport.c, 356:
trace: netsnmp_sockaddr_in(): snmpUDPDomain.c, 653:
trace: netsnmp_sockaddr_in(): snmpUDPDomain.c, 698:
trace: netsnmp_sockaddr_in(): snmpUDPDomain.c, 741:
trace: netsnmp_udp_transport(): snmpUDPDomain.c, 502:
trace: _sock_buffer_size_get(): snmpUDPDomain.c, 345:
trace: _sock_buffer_size_get(): snmpUDPDomain.c, 345:
trace: snmp_sess_add_ex(): snmp_api.c, 1556:
trace: _callback_lock(): callback.c, 118:
trace: snmp_call_callbacks(): callback.c, 304:
trace: snmp_call_callbacks(): callback.c, 318:
trace: snmp_call_callbacks(): callback.c, 330:
trace: _callback_unlock(): callback.c, 150:

This section will repeat very slowly:
trace: snmp_sess_select_info(): snmp_api.c, 5843:
trace: snmp_sess_select_info(): snmp_api.c, 5843:
trace: snmp_sess_select_info(): snmp_api.c, 5843:
trace: run_alarms(): snmp_alarm.c, 250:
trace: agentx_reopen_session(): mibgroup/agentx/subagent.c, 837:
trace: subagent_open_master_session(): mibgroup/agentx/subagent.c, 736:
trace: _callback_lock(): callback.c, 118:
trace: snmp_call_callbacks(): callback.c, 304:
trace: snmp_call_callbacks(): callback.c, 318:
trace: snmp_call_callbacks(): callback.c, 330:
trace: _callback_unlock(): callback.c, 150:
trace: netsnmp_tdomain_transport(): snmp_transport.c, 332:
trace: netsnmp_tdomain_transport(): snmp_transport.c, 350:
trace: netsnmp_tdomain_transport(): snmp_transport.c, 356:
trace: netsnmp_unix_transport(): snmpUnixDomain.c, 284:
trace: netsnmp_unix_transport(): snmpUnixDomain.c, 373:
trace: _sess_open(): snmp_api.c, 1428:
trace: run_alarms(): snmp_alarm.c, 252:
trace: snmp_sess_select_info(): snmp_api.c, 5843:


Whereas the one without the -f does the following very very fast:
trace: snmp_sess_select_info(): snmp_api.c, 5843:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: snmp_sess_select_info(): snmp_api.c, 5843:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: snmp_sess_select_info(): snmp_api.c, 5843:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: snmp_sess_select_info(): snmp_api.c, 5843:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: snmp_sess_select_info(): snmp_api.c, 5843:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: snmp_sess_select_info(): snmp_api.c, 5843:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: snmp_sess_select_info(): snmp_api.c, 5843:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: _sess_read(): snmp_api.c, 5417:
trace: snmp_sess_select_info(): snmp_api.c, 5843:

Can someone let me know what I might be doing wrong.

Thanks,
Jayson Robinson

__________________________________________________ _______________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/g...ave/direct/01/



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=...720&dat=121642
_______________________________________________
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/...net-snmp-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:47 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0