SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
nsradmin, jobquery script
Author Message
Post nsradmin, jobquery script 
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

View user's profile Send private message
Post  
If you want to see a character based Monitoring window, let me suggest that you run nsrwatch. Available for Unix/Linux since years, forWindows with the current version 7.6.2.

View user's profile Send private message
Post nsradmin, jobquery script 
Today at 7:05am, bingo wrote:

If you want to see a character based Monitoring window, let me suggest that you run nsrwatch. Available for Unix/Linux since years, forWindows with the current version 7.6.2.

Let me add that from the Unix/Linux perspective, it is remarkably
improved in 7.6.2 as well! No longer do you have to swap your terminal
window into a teensy font to be able to fit it all in, it actually uses
curses (or something close to it) and you can select and scroll the
individual sections! It is finally usable (for some idiots like me that
have way way way too many devices, clients, and everything else in a
single DataZone).

--
Frank Swasey | http://www.uvm.edu/~fcs
Sr Systems Administrator | Always remember: You are UNIQUE,
University of Vermont | just like everyone else.
"I am not young enough to know everything." - Oscar Wilde (1854-1900)


via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

Post nsradmin, jobquery script 
In regard to: [Networker] nsradmin, jobquery script, gergogyerek said (at...:

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 you want what the GUI shows but without the GUI, then take a look at
running gstclreport from a script and using one of its export format
options (I use CSV and then parse that).

Something like (in perl):

my $report='/Reports/NetWorker Backup Status/Save Set Details by Client';
my $servers='your_server_here';
my $statuses='failed,incomplete,unexpectedly exited';

my < at > cmd = ( '/opt/lgtonmc/bin/gstclreport',
'-u', $conf->user(),
'-P', $conf->password(),
'-f', $temp_file,
'-o', 'landscape',
'-x', 'csv',
'-r', $report,
'-C', 'Server Name', $servers,
'-C', 'Status', $statuses,
'-C', 'Group Start Time', '1 day'
);

my $ret_val = system( < at > cmd) / 256;

and then parse appropriately.

Tim
--
Tim Mooney Tim.Mooney < at > ndsu.edu
Enterprise Computing & Infrastructure 701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164


via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB