/* 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;
}
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);
*/
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);
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;
}
}
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;
}
* 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);
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;
}
if (ua->verbose) {
bsendmsg(ua, "%s", db_strerror(ua->db));
}
- Dmsg0(500, "Count failed\n");
+ Dmsg0(050, "Count failed\n");
goto bail_out;
}
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++) {
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) {
/* 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);
}
/* 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.
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);
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;
}
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);
}
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);
}
{
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);