]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/status.c
bacula-web: Changed header.tpl design and links
[bacula/bacula] / bacula / src / stored / status.c
index deea17e9145bacf3f728131d84ccc01f38c44953..1d51e1f2dd6bb64ddd2c735680aa33c9af300acd 100644 (file)
@@ -1,12 +1,12 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2003-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2003-2010 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
@@ -30,7 +30,6 @@
  *
  *     Kern Sibbald, May MMIII
  *
- *   Version $Id$
  *
  */
 
@@ -42,8 +41,6 @@
 
 /* Imported variables */
 extern BSOCK *filed_chan;
-extern int r_first, r_last;
-extern struct s_res resources[];
 extern void *start_heap;
 
 /* Static variables */
@@ -99,7 +96,7 @@ void output_status(STATUS_PKT *sp)
    list_devices(sp);
 
 
-   len = Mmsg(msg, _("In Use Volume status:\n"));
+   len = Mmsg(msg, _("Used Volume status:\n"));
    if (!sp->api) sendit(msg, len, sp);
 
    list_volumes(sendit, (void *)sp);
@@ -225,8 +222,8 @@ static void list_status_header(STATUS_PKT *sp)
    bstrftime_nc(dt, sizeof(dt), daemon_start_time);
 
 
-   len = Mmsg(msg, _("Daemon started %s, %d Job%s run since started.\n"),
-        dt, num_jobs_run, num_jobs_run == 1 ? "" : "s");
+   len = Mmsg(msg, _("Daemon started %s. Jobs: run=%d, running=%d.\n"),
+        dt, num_jobs_run, job_count());
    sendit(msg, len, sp);
 
    len = Mmsg(msg, _(" Heap: heap=%s smbytes=%s max_bytes=%s bufs=%s max_bufs=%s\n"),
@@ -309,11 +306,11 @@ static void send_blocked_status(DEVICE *dev, STATUS_PKT *sp)
    }
    /* Send autochanger slot status */
    if (dev->is_autochanger()) {
-      if (dev->Slot > 0) {
+      if (dev->get_slot() > 0) {
          len = Mmsg(msg, _("    Slot %d is loaded in drive %d.\n"), 
-            dev->Slot, dev->drive_index);
+            dev->get_slot(), dev->drive_index);
          sendit(msg, len, sp);
-      } else if (dev->Slot == 0) {
+      } else if (dev->get_slot() == 0) {
          len = Mmsg(msg, _("    Drive %d is not loaded.\n"), dev->drive_index);
          sendit(msg, len, sp);
       } else {
@@ -367,7 +364,8 @@ static void send_device_status(DEVICE *dev, STATUS_PKT *sp)
       dev->state & ST_MOUNTED ? "" : "!");
    sendit(msg, len, sp);
 
-   len = Mmsg(msg, _("num_writers=%d block=%d\n\n"), dev->num_writers, dev->blocked());
+   len = Mmsg(msg, _("num_writers=%d reserved=%d block=%d\n\n"), dev->num_writers, 
+              dev->num_reserved(), dev->blocked());
    sendit(msg, len, sp);
 
    len = Mmsg(msg, _("Device parameters:\n"));
@@ -401,12 +399,12 @@ static void list_running_jobs(STATUS_PKT *sp)
    foreach_jcr(jcr) {
       if (jcr->JobStatus == JS_WaitFD) {
          len = Mmsg(msg, _("%s Job %s waiting for Client connection.\n"),
-            job_type_to_str(jcr->JobType), jcr->Job);
+            job_type_to_str(jcr->getJobType()), jcr->Job);
          sendit(msg, len, sp);
       }
       dcr = jcr->dcr;
       rdcr = jcr->read_dcr;
-      if ((dcr && dcr->device) || rdcr && rdcr->device) {
+      if ((dcr && dcr->device) || (rdcr && rdcr->device)) {
          bstrncpy(JobName, jcr->Job, sizeof(JobName));
          /* There are three periods after the Job name */
          char *p;
@@ -418,8 +416,8 @@ static void list_running_jobs(STATUS_PKT *sp)
          if (rdcr && rdcr->device) {
             len = Mmsg(msg, _("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),
+                   job_level_to_str(jcr->getJobLevel()),
+                   job_type_to_str(jcr->getJobType()),
                    JobName,
                    jcr->JobId,
                    rdcr->VolumeName,
@@ -431,8 +429,8 @@ static void list_running_jobs(STATUS_PKT *sp)
          if (dcr && dcr->device) {
             len = Mmsg(msg, _("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),
+                   job_level_to_str(jcr->getJobLevel()),
+                   job_type_to_str(jcr->getJobType()),
                    JobName,
                    jcr->JobId,
                    dcr->VolumeName,
@@ -550,6 +548,9 @@ static void list_terminated_jobs(STATUS_PKT *sp)
       case JS_Terminated:
          termstat = _("OK");
          break;
+      case JS_Warnings:
+         termstat = _("OK -- with warnings");
+         break;
       default:
          termstat = _("Other");
          break;