*
*/
/*
- 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());
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;
+ DCR *dcr, *rdcr;
char JobName[MAX_NAME_LENGTH];
char b1[30], b2[30], b3[30];
job_type_to_str(jcr->JobType), jcr->Job);
}
dcr = jcr->dcr;
- if (dcr && dcr->device) {
+ 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\"\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,
+ 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),
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);
}
+ 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)) {