From 2c41a8177181d96c355fb94c247453ddedd33914 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 21 Nov 2004 13:10:16 +0000 Subject: [PATCH] Update git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1712 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/job.c | 2 +- bacula/src/dird/ua_prune.c | 38 +++++++++++++++++++------------------- bacula/src/lib/btimers.c | 15 ++++++++------- bacula/src/lib/message.c | 2 +- bacula/src/stored/dircmd.c | 4 ++-- 5 files changed, 31 insertions(+), 30 deletions(-) diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index 7be9224212..676d1bcef7 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -287,7 +287,7 @@ bail_out: break; } - Dmsg0(50, "======== End Job ==========\n"); + Dmsg1(50, "======== End Job stat=%c ==========\n", jcr->JobStatus); sm_check(__FILE__, __LINE__, true); return NULL; } diff --git a/bacula/src/dird/ua_prune.c b/bacula/src/dird/ua_prune.c index c0dbaecf13..d72fe1d370 100644 --- a/bacula/src/dird/ua_prune.c +++ b/bacula/src/dird/ua_prune.c @@ -246,12 +246,12 @@ int prune_files(UAContext *ua, CLIENT *client) /* Select Jobs -- for counting */ Mmsg(query, select_job, edit_uint64(now - period, ed1), cr.ClientId); - Dmsg1(500, "select sql=%s\n", query); + Dmsg1(050, "select sql=%s\n", query); if (!db_sql_query(ua->db, query, file_count_handler, (void *)&del)) { if (ua->verbose) { bsendmsg(ua, "%s", db_strerror(ua->db)); } - Dmsg0(500, "Count failed\n"); + Dmsg0(050, "Count failed\n"); goto bail_out; } @@ -276,7 +276,7 @@ int prune_files(UAContext *ua, CLIENT *client) for (i=0; i < del.num_ids; i++) { struct s_count_ctx cnt; - Dmsg1(500, "Delete JobId=%d\n", del.JobId[i]); + Dmsg1(050, "Delete JobId=%d\n", del.JobId[i]); Mmsg(query, cnt_File, del.JobId[i]); cnt.count = 0; db_sql_query(ua->db, query, count_handler, (void *)&cnt); @@ -291,7 +291,7 @@ int prune_files(UAContext *ua, CLIENT *client) */ Mmsg(query, upd_Purged, del.JobId[i]); db_sql_query(ua->db, query, NULL, (void *)NULL); - Dmsg1(500, "Del sql=%s\n", query); + Dmsg1(050, "Del sql=%s\n", query); } edit_uint64_with_commas(del.tot_ids, ed1); edit_uint64_with_commas(del.num_ids, ed2); @@ -323,7 +323,7 @@ static int create_temp_tables(UAContext *ua) for (i=0; create_deltabs[i]; i++) { if (!db_sql_query(ua->db, create_deltabs[i], NULL, (void *)NULL)) { bsendmsg(ua, "%s", db_strerror(ua->db)); - Dmsg0(500, "create DelTables table failed\n"); + Dmsg0(050, "create DelTables table failed\n"); return 0; } } @@ -384,17 +384,17 @@ int prune_jobs(UAContext *ua, CLIENT *client, int JobType) if (ua->verbose) { bsendmsg(ua, "%s", db_strerror(ua->db)); } - Dmsg0(500, "insert delcand failed\n"); + Dmsg0(050, "insert delcand failed\n"); goto bail_out; } /* Count Files to be deleted */ pm_strcpy(query, cnt_DelCand); - Dmsg1(500, "select sql=%s\n", query); + Dmsg1(100, "select sql=%s\n", query); cnt.count = 0; if (!db_sql_query(ua->db, query, count_handler, (void *)&cnt)) { bsendmsg(ua, "%s", db_strerror(ua->db)); - Dmsg0(500, "Count failed\n"); + Dmsg0(050, "Count failed\n"); goto bail_out; } @@ -437,26 +437,26 @@ int prune_jobs(UAContext *ua, CLIENT *client, int JobType) * Then delete the Job entry, and finally and JobMedia records. */ for (i=0; i < del.num_ids; i++) { - Dmsg1(500, "Delete JobId=%d\n", del.JobId[i]); + Dmsg1(050, "Delete JobId=%d\n", del.JobId[i]); if (!del.PurgedFiles[i]) { Mmsg(query, del_File, del.JobId[i]); if (!db_sql_query(ua->db, query, NULL, (void *)NULL)) { bsendmsg(ua, "%s", db_strerror(ua->db)); } - Dmsg1(500, "Del sql=%s\n", query); + Dmsg1(050, "Del sql=%s\n", query); } Mmsg(query, del_Job, del.JobId[i]); if (!db_sql_query(ua->db, query, NULL, (void *)NULL)) { bsendmsg(ua, "%s", db_strerror(ua->db)); } - Dmsg1(500, "Del sql=%s\n", query); + Dmsg1(050, "Del sql=%s\n", query); Mmsg(query, del_JobMedia, del.JobId[i]); if (!db_sql_query(ua->db, query, NULL, (void *)NULL)) { bsendmsg(ua, "%s", db_strerror(ua->db)); } - Dmsg1(500, "Del sql=%s\n", query); + Dmsg1(050, "Del sql=%s\n", query); } bsendmsg(ua, _("Pruned %d %s for client %s from catalog.\n"), del.num_ids, del.num_ids==1?_("Job"):_("Jobs"), client->hdr.name); @@ -498,7 +498,7 @@ int prune_volume(UAContext *ua, MEDIA_DBR *mr) Mmsg(query, cnt_JobMedia, mr->MediaId); if (!db_sql_query(ua->db, query, count_handler, (void *)&cnt)) { bsendmsg(ua, "%s", db_strerror(ua->db)); - Dmsg0(500, "Count failed\n"); + Dmsg0(050, "Count failed\n"); goto bail_out; } @@ -527,7 +527,7 @@ int prune_volume(UAContext *ua, MEDIA_DBR *mr) if (ua->verbose) { bsendmsg(ua, "%s", db_strerror(ua->db)); } - Dmsg0(500, "Count failed\n"); + Dmsg0(050, "Count failed\n"); goto bail_out; } @@ -535,7 +535,7 @@ int prune_volume(UAContext *ua, MEDIA_DBR *mr) period = mr->VolRetention; now = (utime_t)time(NULL); - Dmsg3(500, "Now=%d period=%d now-period=%d\n", (int)now, (int)period, + Dmsg3(200, "Now=%d period=%d now-period=%d\n", (int)now, (int)period, (int)(now-period)); for (i=0; i < del.num_ids; i++) { @@ -543,18 +543,18 @@ int prune_volume(UAContext *ua, MEDIA_DBR *mr) if (!db_get_job_record(ua->jcr, ua->db, &jr)) { continue; } - Dmsg2(500, "Looking at %s JobTdate=%d\n", jr.Job, (int)jr.JobTDate); + Dmsg2(200, "Looking at %s JobTdate=%d\n", jr.Job, (int)jr.JobTDate); if (jr.JobTDate >= (now - period)) { continue; } - Dmsg2(500, "Delete JobId=%d Job=%s\n", del.JobId[i], jr.Job); + Dmsg2(200, "Delete JobId=%d Job=%s\n", del.JobId[i], jr.Job); Mmsg(query, del_File, del.JobId[i]); db_sql_query(ua->db, query, NULL, (void *)NULL); Mmsg(query, del_Job, del.JobId[i]); db_sql_query(ua->db, query, NULL, (void *)NULL); Mmsg(query, del_JobMedia, del.JobId[i]); db_sql_query(ua->db, query, NULL, (void *)NULL); - Dmsg1(500, "Del sql=%s\n", query); + Dmsg1(050, "Del sql=%s\n", query); del.num_del++; } if (del.JobId) { @@ -567,7 +567,7 @@ int prune_volume(UAContext *ua, MEDIA_DBR *mr) /* If purged, mark it so */ if (del.num_ids == del.num_del) { - Dmsg0(500, "Volume is purged.\n"); + Dmsg0(200, "Volume is purged.\n"); stat = mark_media_purged(ua, mr); } diff --git a/bacula/src/lib/btimers.c b/bacula/src/lib/btimers.c index 994afe4d0b..a35e154656 100644 --- a/bacula/src/lib/btimers.c +++ b/bacula/src/lib/btimers.c @@ -96,7 +96,7 @@ static void callback_child_timer(watchdog_t *self) /* First kill attempt; try killing it softly (kill -SONG) first */ wid->killed = true; - Dmsg2(200, "watchdog %p term PID %d\n", self, wid->pid); + Dmsg2(050, "watchdog %p term PID %d\n", self, wid->pid); /* Kill -TERM the specified PID, and reschedule a -KILL for 3 seconds * later. @@ -105,7 +105,7 @@ static void callback_child_timer(watchdog_t *self) self->interval = 3; } else { /* This is the second call - terminate with prejudice. */ - Dmsg2(200, "watchdog %p kill PID %d\n", self, wid->pid); + Dmsg2(050, "watchdog %p kill PID %d\n", self, wid->pid); kill(wid->pid, SIGKILL); @@ -165,7 +165,8 @@ btimer_t *start_bsock_timer(BSOCK *bsock, uint32_t wait) wid->wd->interval = wait; register_watchdog(wid->wd); - Dmsg3(50, "Start bsock timer %p tip %p for %d secs.\n", wid, wid->tid, wait); + Dmsg4(50, "Start bsock timer %p tid=%p for %d secs at %d\n", wid, + wid->tid, wait, time(NULL)); return wid; } @@ -179,7 +180,7 @@ void stop_bsock_timer(btimer_t *wid) Dmsg0(200, "stop_bsock_timer called with NULL btimer_id\n"); return; } - Dmsg2(50, "Stop bsock timer %p tid %p.\n", wid, wid->tid); + Dmsg3(50, "Stop bsock timer %p tid=%p at %d.\n", wid, wid->tid, time(NULL)); stop_btimer(wid); } @@ -193,7 +194,7 @@ void stop_thread_timer(btimer_t *wid) Dmsg0(200, "stop_thread_timer called with NULL btimer_id\n"); return; } - Dmsg2(200, "Stop thread timer %p tid %p.\n", wid, wid->tid); + Dmsg2(200, "Stop thread timer %p tid=%p.\n", wid, wid->tid); stop_btimer(wid); } @@ -210,10 +211,10 @@ static void callback_thread_timer(watchdog_t *self) { btimer_t *wid = (btimer_t *)self->data; - Dmsg2(50, "watchdog %p kill thread %d\n", self, wid->tid); + Dmsg4(50, "thread timer %p kill %s tid=%p at %d.\n", self, + wid->type == TYPE_BSOCK ? "bsock" : "thread", wid->tid, time(NULL)); if (wid->type == TYPE_BSOCK && wid->bsock) { - Dmsg0(50, "kill type bsock ...\n"); wid->bsock->timed_out = true; } pthread_kill(wid->tid, TIMEOUT_SIGNAL); diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index 1c060c5486..0edf834f3a 100755 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -243,7 +243,7 @@ init_msg(JCR *jcr, MSGS *msg) daemon_msgs->dest_chain = temp_chain; memcpy(daemon_msgs->send_msg, msg->send_msg, sizeof(msg->send_msg)); } - Dmsg2(050, "Copy message resource 0x%x to 0x%x\n", msg, temp_chain); + Dmsg2(250, "Copy message resource 0x%x to 0x%x\n", msg, temp_chain); } diff --git a/bacula/src/stored/dircmd.c b/bacula/src/stored/dircmd.c index 644c545872..8d7e136d6d 100644 --- a/bacula/src/stored/dircmd.c +++ b/bacula/src/stored/dircmd.c @@ -182,7 +182,7 @@ void *handle_connection_request(void *arg) if ((bnet_stat = bnet_recv(bs)) <= 0) { break; /* connection terminated */ } - Dmsg1(9, "msg); + Dmsg1(199, "msg); found = false; for (i=0; cmds[i].cmd; i++) { if (strncmp(cmds[i].cmd, bs->msg, strlen(cmds[i].cmd)) == 0) { @@ -194,7 +194,7 @@ void *handle_connection_request(void *arg) } if (!cmds[i].func(jcr)) { /* do command */ quit = true; /* error, get out */ - Dmsg1(90, "Command %s requsts quit\n", cmds[i].cmd); + Dmsg1(190, "Command %s requsts quit\n", cmds[i].cmd); } found = true; /* indicate command found */ break; -- 2.39.5