Networker

[Networker] nsradmin, jobquery script

2011-10-20 08:18:36
Subject: [Networker] nsradmin, jobquery script
From: gergogyerek <networker-forum AT BACKUPCENTRAL DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 20 Oct 2011 02:38:49 -0700
Good Morning, 
I'd like to write a script that can be used to check the morning status of the 
backup zones without the GUI.
The output should contain:
status;group name; last run; % complete (!); -> basically what's shown on the 
GUI.

if I use 
printf "show name; start time; status \np type:nsr group;autostart: Enabled\n" 
| /usr/sbin/nsradmin -s server_name -i- 
it will tell only Running or Idle for the status. most of them are idle, but 
cannot tell if it succeeded of failed. 
and completion status is missing.

If I use jobquery
printf " show name; job state; completion status \nprint type:savegroup job\n" 
| /usr/sbin/jobquery -s server_name -i-
it will give proper completion status, but the problem is that in one group 
multiple jobs run, and one might fail one might succeed and not sure how to 
consolidate these info.

% complete would be the most important question.
thanks
Gergely

+----------------------------------------------------------------------
|This was sent by gergogyerek AT gmail DOT com via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the body of the email. Please write to 
networker-request AT listserv.temple DOT edu if you have any problems with this 
list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

<Prev in Thread] Current Thread [Next in Thread>