]> git.sur5r.net Git - bacula/bacula/commitdiff
Update
authorKern Sibbald <kern@sibbald.com>
Sun, 21 Nov 2004 13:10:16 +0000 (13:10 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 21 Nov 2004 13:10:16 +0000 (13:10 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1712 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/job.c
bacula/src/dird/ua_prune.c
bacula/src/lib/btimers.c
bacula/src/lib/message.c
bacula/src/stored/dircmd.c

index 7be9224212ca139f99e320f206027464344a677b..676d1bcef7e1a77bbaaf62afd9ffefa57804ddc8 100644 (file)
@@ -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;
 }
index c0dbaecf13efe518a2253ebb61fe753b9db49241..d72fe1d370854552dd1eed55afe3880e703be570 100644 (file)
@@ -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);
    }
 
index 994afe4d0ba8eac2d143f5244ec1a9dd44883e24..a35e154656b1ec30b88395e0e3a607e54bb077ed 100644 (file)
@@ -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);
index 1c060c5486acd7cb4283920b23006003de419ca5..0edf834f3a28dd3ae1be4b5ff80a6de06e712f0b 100755 (executable)
@@ -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);
 
 }
 
index 644c5458724d886e7607e665cd8f48429ec8c43c..8d7e136d6dd787eeb267e29ac351f616b20936c6 100644 (file)
@@ -182,7 +182,7 @@ void *handle_connection_request(void *arg)
       if ((bnet_stat = bnet_recv(bs)) <= 0) {
         break;               /* connection terminated */
       }
-      Dmsg1(9, "<dird: %s\n", bs->msg);
+      Dmsg1(199, "<dird: %s\n", bs->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;