I'm using FreeBSD 9.2-RELEASE:
# uname -a
FreeBSD f9.alexus.org 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC 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.
#
- How can I debug what's causing
bsnmpd(1)
to exit at the first place? - What's wrong w/ my cronjob?