In regard to: RE: [Networker] I need a report by schedule ..., Michael...:
Tim,
Could you send out a few lines of the output? Thanks
Sure:
$nsr_schedprint_by_group 'NDSU ITS Misc'
bb-fs1-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
db1-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
filstor1-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
db2-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
stealth-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
webstor-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
db1-s.chpc.ndsu.nodak.edu Full on 1st Sunday, daily incr
bb-web2-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
idm.ndsu.nodak.edu Full on 1st Sunday, daily incr
cms1-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
ndsunwfs06.ndsu.nodak.edu Full on 1st Sunday, daily incr
ndsunwfs04.ndsu.nodak.edu Full on 1st Sunday, daily incr
ndsunwzw01.ndsu.nodak.edu Full on 1st Sunday, daily incr
search-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
audit-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
goprnsrv-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
delphi-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
ndsunwfs01.ndsu.nodak.edu Full on 1st Sunday, daily incr
db3-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
bb-db1-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
filstor2-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
livewire-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
ar-app-s.nodak.edu Full on 1st Sunday, daily incr
resstor-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
ar-web1-s.nodak.edu Full on 1st Sunday, daily incr
epo-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
hannibal-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
ndsunwfs03.ndsu.nodak.edu Full on 1st Sunday, daily incr
ndsunwfs05.ndsu.nodak.edu Full on 1st Sunday, daily incr
ndsunwps01.ndsu.nodak.edu Full on 1st Sunday, daily incr
nexus-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
ndsunwds01.ndsu.nodak.edu Full on 1st Sunday, daily incr
ndsunwds02.ndsu.nodak.edu Full on 1st Sunday, daily incr
rsg1-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
ndsunwfs02.ndsu.nodak.edu Full on 1st Sunday, daily incr
ndsumsap01-s.ndsu.nodak.edu Full on 1st Sunday, daily incr
Tim
-----Original Message-----
From: EMC NetWorker discussion [mailto:NETWORKER AT LISTSERV.TEMPLE DOT EDU] On
Behalf Of Tim Mooney
Sent: Friday, April 11, 2008 2:39 PM
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Subject: Re: [Networker] I need a report by schedule ...
In regard to: [Networker] I need a report by schedule ..., MIchael Leone...:
I'd like to run a report (mminfo, preferrably) that lists my groups by
schedule, so I can see which are on the "Full Every Day Skip Sat Sun" and
which are on "Sat Only", etc. But I don't seem to see a way to list out
the schedule of a group.
That's not stored in the media database, so mminfo won't tell you about
it.
Am I just missing that, in the query criteria?
Here's what I use, on our Linux NetWorker server, for that exact purpose.
If you have ActiveState perl on your Windows box, this should work
directly from a DOS box.
#!/usr/bin/perl -w
use strict;
use POSIX qw(tmpnam);
if ($#ARGV < 0) {
print STDERR "$0: usage: nsr_schedprint_by_group groupname\n";
exit(1);
}
use vars qw($line $current_client $current_group $tmpfile $nsradmin_cmd
$current_schedule);
$nsradmin_cmd = '/usr/sbin/nsradmin';
#
# TVM: feed the following to nsradmin.
#
$tmpfile = POSIX::tmpnam();
open(QFILE, ">$tmpfile") or die "Can't create temporary file $tmpfile:
$!\n";
print QFILE 'option Dynamic', "\n";
print QFILE 'option Hidden', "\n";
print QFILE '. type: NSR Client', "\n";
print QFILE 'show Group; Name; Schedule', "\n";
print QFILE 'print', "\n";
close(QFILE) or die "close failed for $tmpfile: $!\n";
#
# Now run nsradmin with this query.
#
open(NSRADMIN, "$nsradmin_cmd -i $tmpfile |") or
die "Can't pipe from nsradmin: $!\n";
while (defined($line=<NSRADMIN>)) {
chomp($line);
if ($line =~ /^\s*name: (.*);\s*$/) {
$current_client = $1;
}
if ($line =~ /^\s*schedule: "(.*)";\s*$/) {
$current_schedule = $1;
} elsif ($line =~ /^\s*schedule: (.*);\s*$/) {
$current_schedule = $1;
}
if ($line =~ /^\s*group: (.*);\s*$/) {
$current_group = $1;
}
if ($line =~ /^\s*$/) {
if (defined($current_group) and defined($current_client)
and defined($current_schedule)) {
if ($current_group eq $ARGV[0]) {
printf "%-40.40s %s\n", "$current_client",
"$current_schedule";
}
undef($current_client);
undef($current_group);
undef($current_schedule);
}
}
}
close(NSRADMIN) or
print STDERR "$0: $nsradmin_cmd returned $?: $!\n";
#unlink($tmpfile);
NW 7.4.1, Win2003.
--
Tim Mooney Tim.Mooney AT ndsu DOT edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
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
|