From b6b6059f0eb662a96b210f5dbd7c82c494fdd847 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 11 Oct 2006 16:50:41 +0000 Subject: [PATCH] kes Turn on heap reporting in Dir with zero debug level. kes Send a message to the sys log when Bacula forces a SEG FAULT, and send the same message to stdout. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3546 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/ua_status.c | 7 +++---- bacula/src/lib/message.c | 2 ++ bacula/src/version.h | 4 ++-- bacula/technotes-1.39 | 4 ++++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/bacula/src/dird/ua_status.c b/bacula/src/dird/ua_status.c index 596d742659..16b82cba5b 100644 --- a/bacula/src/dird/ua_status.c +++ b/bacula/src/dird/ua_status.c @@ -237,6 +237,7 @@ static void do_all_status(UAContext *ua) static void do_director_status(UAContext *ua) { char dt[MAX_TIME_LENGTH]; + char b1[35], b2[35], b3[35], b4[35]; bsendmsg(ua, _("%s Version: %s (%s) %s %s %s\n"), my_name, VERSION, BDATE, HOST_OS, DISTNAME, DISTVER); @@ -248,14 +249,12 @@ static void do_director_status(UAContext *ua) bsendmsg(ua, _("Daemon started %s, %d Jobs run since started.\n"), dt, num_jobs_run); } - if (debug_level > 0) { - char b1[35], b2[35], b3[35], b4[35]; - bsendmsg(ua, _(" Heap: bytes=%s max_bytes=%s bufs=%s max_bufs=%s\n"), + bsendmsg(ua, _(" Heap: bytes=%s max_bytes=%s bufs=%s max_bufs=%s\n"), edit_uint64_with_commas(sm_bytes, b1), edit_uint64_with_commas(sm_max_bytes, b2), edit_uint64_with_commas(sm_buffers, b3), edit_uint64_with_commas(sm_max_buffers, b4)); - } + /* * List scheduled Jobs */ diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index 03074b5487..15a939590e 100755 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -1099,6 +1099,8 @@ Jmsg(JCR *jcr, int type, time_t mtime, const char *fmt,...) if (type == M_ABORT){ char *p = 0; + printf("Bacula forced SEG FAULT to obtain traceback.\n"); + syslog(LOG_DAEMON|LOG_ERR, "Bacula forced SEG FAULT to obtain traceback.\n"); p[0] = 0; /* generate segmentation violation */ } if (type == M_ERROR_TERM) { diff --git a/bacula/src/version.h b/bacula/src/version.h index 502170bc04..e2a49f95fc 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "1.39.25" -#define BDATE "07 October 2006" -#define LSMDATE "07Oct06" +#define BDATE "08 October 2006" +#define LSMDATE "08Oct06" #define BYEAR "2006" /* year for copyright messages in progs */ /* Debug flags */ diff --git a/bacula/technotes-1.39 b/bacula/technotes-1.39 index 70fc1ef297..bd4d580ac4 100644 --- a/bacula/technotes-1.39 +++ b/bacula/technotes-1.39 @@ -1,6 +1,10 @@ Technical notes on version 1.39 General: +08Oct06 +kes Turn on heap reporting in Dir with zero debug level. +kes Send a message to the sys log when Bacula forces a SEG FAULT, and + send the same message to stdout. 07Oct06 kes Begin work on new GUI "console". kes Make configure look in non-standard MySQL library directory -- 2.39.5