*
*/
/*
- Copyright (C) 2003-2005 Kern Sibbald
+ Copyright (C) 2003-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
dev = device->dev;
if (dev && dev->is_open()) {
if (dev->is_labeled()) {
- bnet_fsend(user, _("Device %s is mounted with Volume \"%s\"\n"),
- dev->print_name(), dev->VolHdr.VolumeName);
+ bnet_fsend(user, _("Device %s is mounted with Volume=\"%s\" Pool=\"%s\"\n"),
+ dev->print_name(), dev->VolHdr.VolumeName,
+ dev->pool_name[0]?dev->pool_name:"*unknown*");
} else {
bnet_fsend(user, _("Device %s open but no Bacula volume is mounted.\n"),
dev->print_name());
}
}
bnet_fsend(user, _("====\n\n"));
- bnet_fsend(user, _("Volume status:\n"));
+ bnet_fsend(user, _("In Use Volume status:\n"));
list_volumes(user);
+ bnet_fsend(user, _("====\n\n"));
-
#ifdef xxx
- if (debug_level > 0) {
+ if (debug_level > 10) {
bnet_fsend(user, _("====\n\n"));
dump_resource(R_DEVICE, resources[R_DEVICE-r_first].res_head, sendit, user);
+ bnet_fsend(user, _("====\n\n"));
}
- bnet_fsend(user, _("====\n\n"));
#endif
list_spool_stats(user);
bool found = false;
int bps, sec;
JCR *jcr;
+ DCR *dcr, *rdcr;
char JobName[MAX_NAME_LENGTH];
char b1[30], b2[30], b3[30];
bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
job_type_to_str(jcr->JobType), jcr->Job);
}
- if (jcr->dcr && jcr->dcr->device) {
+ dcr = jcr->dcr;
+ rdcr = jcr->read_dcr;
+ if ((dcr && dcr->device) || rdcr && rdcr->device) {
bstrncpy(JobName, jcr->Job, sizeof(JobName));
/* There are three periods after the Job name */
char *p;
*p = 0;
}
}
- bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
+ if (rdcr && rdcr->device) {
+ bnet_fsend(user, _("Reading: %s %s job %s JobId=%d Volume=\"%s\"\n"
+ " pool=\"%s\" device=\"%s\"\n"),
job_level_to_str(jcr->JobLevel),
job_type_to_str(jcr->JobType),
JobName,
jcr->JobId,
- jcr->dcr->VolumeName,
- jcr->dcr->device->device_name);
+ rdcr->VolumeName,
+ rdcr->pool_name,
+ rdcr->dev?rdcr->dev->print_name():
+ rdcr->device->device_name);
+ }
+ if (dcr && dcr->device) {
+ bnet_fsend(user, _("Writing: %s %s job %s JobId=%d Volume=\"%s\"\n"
+ " pool=\"%s\" device=\"%s\"\n"),
+ job_level_to_str(jcr->JobLevel),
+ job_type_to_str(jcr->JobType),
+ JobName,
+ jcr->JobId,
+ dcr->VolumeName,
+ dcr->pool_name,
+ dcr->dev?dcr->dev->print_name():
+ dcr->device->device_name);
+ }
sec = time(NULL) - jcr->run_time;
if (sec <= 0) {
sec = 1;
}
#endif
}
- free_jcr(jcr);
}
+ endeach_jcr(jcr);
+
if (!found) {
bnet_fsend(user, _("No Jobs running.\n"));
}
if (njcr->JobId != 0) {
bnet_fsend(dir, DotStatusJob, njcr->JobId, njcr->JobStatus, njcr->JobErrors);
}
- free_jcr(njcr);
}
- }
- else if (strcmp(time.c_str(), "last") == 0) {
+ endeach_jcr(njcr);
+ } else if (strcmp(time.c_str(), "last") == 0) {
bnet_fsend(dir, OKqstatus, time.c_str());
if ((last_jobs) && (last_jobs->size() > 0)) {
job = (s_last_job*)last_jobs->last();
bnet_fsend(dir, DotStatusJob, job->JobId, job->JobStatus, job->Errors);
}
- }
- else {
+ } else {
pm_strcpy(jcr->errmsg, dir->msg);
Jmsg1(jcr, M_FATAL, 0, _("Bad .status command: %s\n"), jcr->errmsg);
bnet_fsend(dir, _("3900 Bad .status command, wrong argument.\n"));