Re: bsnmpd daemon eating all cpu



Tuesday 22 of January 2008 21:02:01 napisałeś(-łaś):
Bartosz Giza wrote:
Tuesday 22 of January 2008 17:25:15 Harti Brandt napisał(a):
Hi,

On Tue, 22 Jan 2008, Bartosz Giza wrote:

BG>I am using dell poweredge sc440 router with one xeon dual core cpu.
BG>This is basicly only router for dummynet firewall dhcpd and named.
BG>I want to run bsnmpd daemon but when i start it it starts eating all
cpu from BG>one core.
BG>I have run truss to check what it is doing and i have got huge amount
of such BG>syscalls
BG>gettimeofday({1201008182.366354},0x0) = 0 (0x0)
BG>
BG>I want to use this daemon because it is in base system but if i could
not run BG>this daemon in normal way i will be forced to use net-snmpd
port. BG>I have basic config with hotres module added.
BG>I am running freebsd 7.0-prerelease.
BG>Alsa what is strange i have exactly the same machine with freebsd
BG>7.0-prerelase but with only one network card for testing and bsnmpd
behaves BG>normal.
BG>Could some one help me with this. I can send dump from truss or even
do some BG>more testing.

Could you please disable all modules? Just comment out all lines
starting from the Load MIB-2 module line. What does it do then?

When i turn off all modules bsnmpd uses 0% of cpu. When i have added this
snmp_mibII.so module it started again to use 100% of one core.
On other UP kernels with 7-PRE bsnmpd behaves good. And also when i was
trying to find what is going on i found that it happens when there is
quite bit of traffic on interfaces.
For test purposes i have downed lan interface and bsnmpd stopped to use
100% of cpu. And when i have brought up lan interface bsnmpd started
again to use 100% od cpu. So it is related to IP traffic.

I have a feeling that this is related to the 64-bit counter emulation.
Could you please tell me what interfaces you have in that machine and on
what speed they are running? Have you set any of the begemot* variables
for MIB-2 in snmpd.conf (especially the polling related ones)? Maybe
just send me the snmpd.conf?

harti

Ok, i have one bge and two fxp interfaces.
bge0: media: Ethernet autoselect (1000baseTX <full-duplex>)
fxp0: media: Ethernet autoselect (100baseTX <full-duplex>)
fxp1: media: Ethernet autoselect (100baseTX <full-duplex>)

Below is my config, and i hardly changed anything exept of comunity and
listening ip.

Thanks

---------------------
location := ""
contact := ""
system := 1 # FreeBSD
traphost := localhost
trapport := 162

# Change this!
read := ""
# Uncomment begemotSnmpdCommunityString.0.2 below that sets the community
# string to enable write access.
write := "geheim"
trap := "mytrap"

#
# Configuration
#
%snmpd
begemotSnmpdDebugDumpPdus = 2
begemotSnmpdDebugSyslogPri = 7

#
# Set the read and write communities.
#
# The default value of the community strings is NULL (note, that this is
# different from the empty string). This disables both read and write access.
# To enable read access only the read community string must be set. Setting
# the write community string enables both read and write access with that
# string.
#
# Be sure to understand the security implications of SNMPv2 - the community
# strings are readable on the wire!
#
begemotSnmpdCommunityString.0.1 = $(read)
# begemotSnmpdCommunityString.0.2 = $(write)
begemotSnmpdCommunityDisable = 1

# open standard SNMP ports
begemotSnmpdPortStatus..161 = 1

# open a unix domain socket
begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1
begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4

# send traps to the traphost
begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4
begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2
begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap)
sysContact = $(contact)
sysLocation = $(location)
sysObjectId = 1.3.6.1.4.1.12325.1.1.2.1.$(system)

#snmpEnableAuthenTraps = 2

#
# Load MIB-2 module
#
begemotSnmpdModulePath."mibII" = "/usr/lib/snmp_mibII.so"

# Force a polling rate for the 64-bit interface counters in case
# the automatic computation is wrong (which may be the case if an interface
# announces the wrong bit rate via its MIB).
#%mibII
#begemotIfForcePoll = 2000

#
# Netgraph module
#
#begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so"
#
#%netgraph
#begemotNgControlNodeName = "snmpd"

#
# pf(4) module
#
#begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so"

#
# Host resources module
# This requires the mibII module.
#
begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so"

#
# Bridge module
# This requires the mibII module.
#
#begemotSnmpdModulePath."bridge" = "/usr/lib/snmp_bridge.so"

--
Pozdrawiam
Bartosz Giza
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Your worst project?
    ... 500 KHz instead of the native 1 MHz for the CPU. ... then I picked up an IMI 5MB hard disk with a controller whose ... external interface looked a bit like SASI, ... starting with a Sun 2/120, and up through a current pair of Sun Blade ...
    (rec.crafts.metalworking)
  • Re: [PATCH] arch/tile: new multi-core architecture for Linux
    ... 32 bit binaries from a native 32 bit system on TILE-Gx in the syscall ... since the architectures are too different -- ... kernel interface, while for 64 bit the two are identical, so we take ... that cpu. ...
    (Linux-Kernel)
  • e1000_intr in request_irq faults in 2.6.20-git
    ... Bringing up loopback interface: ... DMA zone: ... ACPI: ... CPU 0 irqstacks, hard=c05c8000 soft=c05c0000 ...
    (Linux-Kernel)
  • system report 7.2 beta1
    ... The big problem of my laptop is the intel video card, xorg eat up half of my memory,and it's very slow moving windows. ... <CPU Frequency Thermal Control> on cpu0 ... info.subsystem = 'platform' (string) ... net.interface_up = true (bool) ...
    (freebsd-stable)
  • Re: Ada.Execution_Time
    ... For some years I've had a package that defines a "Counter" object that ... -- PACKAGE FOR CPU TIME CALCULATIONS. ... function Process_Lifespan return Duration; ... Use a prefix string to label the output according ...
    (comp.lang.ada)