Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using FreeBSD 9.2-RELEASE:

# uname -a
FreeBSD 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013  amd64

every once in a while bsnmpd(1) is producing following message for me:

# bzip2 -cd /var/log/all.log.0.bz2 | grep bsnmpd
Oct 12 21:01:44 f9 kernel: pid 62584 (bsnmpd), uid 0: exited on signal 6 (core dumped)

I REALLY would like to figure out what's the causing it, but meanwhile:

# crontab -l | grep @hourly
@hourly     `which service` bsnmpd status >/dev/null ; if ( $? != 0 ) `which service` bsnmpd start ; endif

I keep getting email w/ following message:

Syntax error: word unexpected (expecting "then")

test (via shell):

# `which service` bsnmpd status >/dev/null ; if ( $? != 0 ) `which service` bsnmpd start ; endif
# /etc/rc.d/bsnmpd stop
Stopping bsnmpd.
Waiting for PIDS: 60671.
# /etc/rc.d/bsnmpd status
bsnmpd is not running.
# `which service` bsnmpd status > /dev/null ; if ( $? != 0 ) `which service` bsnmpd start ; endif
Starting bsnmpd.
# /etc/rc.d/bsnmpd status
bsnmpd is running as pid 61042.
  1. How can I debug what's causing bsnmpd(1) to exit at the first place?
  2. What's wrong w/ my cronjob?
share|improve this question

You'll want the cron job to look more like this:

/usr/sbin/service bsnmpd status >/dev/null ; if [ $? != 0 ] ; then /usr/sbin/service bsnmpd start ; fi

Anyway, let's figure out why bsnmpd is core dumping. See if you can find the bsnmpd.core file, then run /usr/bin/gdb /usr/sbin/bsnmpd bsnmpd.core then run bt and paste the output.

share|improve this answer
please see : – alexus Oct 14 '13 at 19:21
Could you share your snmp configs, if any? – Steve Wills Oct 14 '13 at 20:42
I'm using default /etc/snmpd.conf that came w/ FreeBSD 9.2-RELEASE # $FreeBSD: release/9.2.0/etc/snmpd.config 216595 2010-12-20 17:28:15Z syrinx $ (w/out any modifications) – alexus Oct 15 '13 at 15:17
Ok, can you tell me what SNMP requests are being made? Perhaps there's some particular request that triggers the SIGABRT? – Steve Wills Oct 15 '13 at 15:33
I'm using mrtg-2.17.4_4,1, so all requests comes from that and most of the time everything works fine (as I can see it via web page) yet every once in a while bsnmpd and produce /bsnmpd.core file. – alexus Oct 15 '13 at 16:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.