Networker

Re: [Networker] mminfo question

2006-10-31 16:15:52
Subject: Re: [Networker] mminfo question
From: Darren Dunham <ddunham AT TAOS DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Tue, 31 Oct 2006 13:07:54 -0800
> 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

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