Many thanks all.
I think I've got enough info to knock this together now.
Cheeers... Allan.
-----Original Message-----
From: EMC NetWorker discussion [mailto:NETWORKER AT LISTSERV.TEMPLE DOT EDU] On
Behalf Of Davina Treiber
Sent: 29 September 2009 17:48
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Subject: Re: [Networker] List last FULL using mminfo
Here's one that I wrote a few years ago to do this.
#!/usr/bin/perl
use Getopt::Std;
my %opts;
getopts('s:', \%opts);
#$ENV{"LC_TIME"}="LC_TIME=en_GB.ISO8859-15";
$ENV{PATH}="/bin:/usr/bin:/usr/sbin:/opt/networker/bin";
open MMINFO, "mminfo -s $opts{'s'} -q \"!incomplete,level=full\" -r
\"nsavetime,savetime,client,totalsize(9),name\" |";
while (<MMINFO>) {
next if /^ save time /;
($nsavetime, $savetime, $client, $size, $mult, @name) = split;
$name = join " ", @name;
if (defined $latestnsavetime{$client}{$name}) {
$l_nsavetime = $latestnsavetime{$client}{$name};
if ($nsavetime gt $l_nsavetime) {
$latestnsavetime{$client}{$name} = $nsavetime;
$latestsavetime{$client}{$name} = $savetime;
$latestsize{$client}{$name} = "$size $mult";
}
else {
};
}
else {
$latestnsavetime{$client}{$name} = $nsavetime;
$latestsavetime{$client}{$name} = $savetime;
$latestsize{$client}{$name} = "$size $mult";
};
};
for $client (sort keys %latestnsavetime) {
for $name (sort keys %{ $latestnsavetime{$client} } ) {
printf "%10s %-15s%-40s%-10s%8s\n",
$latestnsavetime{$client}{$name}, $client, $name,
$latestsavetime{$client}{$name}, $latestsize{$client}{$name};
};
};
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
--
This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.
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
|