Networker

Re: [Networker] mminfo question

2006-10-31 23:36:55
Subject: Re: [Networker] mminfo question
From: Peter Viertel <Peter.Viertel AT MACQUARIE DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Wed, 1 Nov 2006 15:33:29 +1100
This is good - but there's one more thing you need to consider when
you're trying to add up totalsize.

Where a saveset is broken into multiple chunks - eg it spans tapes, you
will get multiple lines for the same saveset, but totalsize is for the
whole saveset, and adding the sumsizes up is a little problematic if you
have clones of savesets...

I run something like....

mminfo -q
'savetime>$date1,savetime<$date2,!incomplete,!suspect,first=0'    -r
'ssid,totalsize,client'

The first=0 is a but of a kludge that just means 'the first chunk'....


If you have clones, this needs to be fed into a perl hash or something
keyed on the ssid to de-duplicate the clone entries

-----Original Message-----
From: EMC NetWorker discussion [mailto:NETWORKER AT listserv.temple DOT edu] On
Behalf Of Darren Dunham
Sent: Wednesday, 1 November 2006 8:08 AM
To: NETWORKER AT listserv.temple DOT edu
Subject: Re: [Networker] mminfo question

> I need to compile some information on my Solaris 9 Networker 7.2
server.
> I need to know for a given date how much data was backed up to each
client.
> Right now i run this command:
> mminfo -r "savetime,sumsize,client" -q 
> "pool=Default,savetime>=10/23/06,savetime<=10/24/06"
> 
> However I need the output in GB and totaled for each machine not
broken 
> down by save set.
> The above command produces this mess:
> 
>  date      size client
> 10/23/06 8735 MB fermat
> 10/23/06 8260 MB fermat

You can get rid of the MB/KB stuff by changing the field size for
sumsize (or you could move over to 'totalsize').

Remember that when you give a date, it means midnight of that date.  So
by saying >=, it's not different than > except for a single second.

Perl or awk can sum over several pieces of information.

$ mminfo -avr 'sumsize(15),client' -q "savetime>$date1,savetime<$date2"
| perl -lane 'BEGIN{<>} $h{$F[1]}+=$F[0]; END{for $client (sort keys
%h){ print "$client $h{$client}"}}'

Okay, that's a little long for a one-liner.  And it's in bytes.  You
wanted GB.

How about...
$ mminfo -avr 'sumsize(10),client' -q "savetime>$date1,savetime<$date2"
| perl -lane 'BEGIN{<>} $h{$F[1]}+=$F[0]; END{for $client (sort keys
%h){ printf "%9.2f %s\n", $h{$client}/(10**9), $client}}'










-- 
Darren Dunham                                           ddunham AT taos DOT com
Senior Technical Consultant         TAOS            http://www.taos.com/
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >

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
wit 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


NOTICE
This e-mail and any attachments are confidential and may contain copyright 
material of Macquarie Bank or third parties. If you are not the intended 
recipient of this email you should not read, print, re-transmit, store or act 
in reliance on this e-mail or any attachments, and should destroy all copies of 
them. Macquarie Bank does not guarantee the integrity of any emails or any 
attached files. The views or opinions expressed are the author's own and may 
not reflect the views or opinions of Macquarie Bank.

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
wit 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>