Networker

Re: [Networker] mminfo question

2006-10-31 16:11:02
Subject: Re: [Networker] mminfo question
From: "Groth, Jonathan A" <jonathan.groth AT EDS DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Tue, 31 Oct 2006 15:57:47 -0500
Here is a ksh script that should work... should be possible to add
command line args to the script for the dates, so you don't have to
manually go in and change the dates everytime you want it run...

#!/bin/ksh

LOGS=/tmp

MMINFO_OUTPUT=$LOGS/mminfo_output.log
CLIENTS=$LOGS/clients.log

mminfo -r "savetime,sumsize,client" -q
"pool=Default,savetime>=10/23/06,savetime<=10/24/06" > $MMINFO_OUTPUT

cat $MMINFO_OUTPUT | awk '{print $4}' | uniq -d > $CLIENTS

for client in `cat $CLIENTS`
do
    KB=`cat $MMINFO_OUTPUT | grep $client | grep KB | awk '{sum = sum +
$2} END {print sum}'`
    MB=`cat $MMINFO_OUTPUT | grep $client | grep MB | awk '{sum = sum +
$2} END {print sum}'`
    GB=`cat $MMINFO_OUTPUT | grep $client | grep GB | awk '{sum = sum +
$2} END {print sum}'`

    Total_KB=`echo $KB | awk '{printf ("%.2f\n", ($1/1024/1024))}'`
    Total_MB=`echo $MB | awk '{printf ("%.2f\n", ($1/1024))}'`
    Total_GB=`echo $Total_KB $Total_MB $GB| awk '{printf ("%.2f\n",
($1+$2+$3))}'`

    echo "$client    $Total_GB GB"
done


-Jonathan 

-----Original Message-----
From: EMC NetWorker discussion [mailto:NETWORKER AT LISTSERV.TEMPLE DOT EDU] On
Behalf Of William Fennell
Sent: Tuesday, October 31, 2006 3:10 PM
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Subject: [Networker] mminfo question

Hi,

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
10/23/06 3010 MB fermat
10/23/06 9044 MB fermat
10/23/06 240 MB jordan
10/23/06 3541 MB jordan
10/23/06 5455 MB jordan
10/23/06  22 GB nfssrv1
10/23/06  24 GB nfssrv1
10/23/06  11 GB nfssrv1
10/23/06 144 MB nfssrv1
10/23/06  62 MB nfssrv1
10/23/06  68 MB fermat
10/23/06 3058 MB fermat
10/23/06 2945 MB fermat
10/23/06 2318 MB fermat
10/23/06 2789 MB fermat
10/23/06 2633 MB fermat
10/23/06 4456 MB franklin
10/23/06 4509 MB jordan
10/23/06 4211 MB jordan
10/23/06 4334 MB jordan
10/23/06 922 MB jordan
10/23/06 2255 MB jordan
10/23/06   4  B darth
10/23/06 197 MB mayflower
10/23/06  24 KB bartok
10/23/06   4  B capecod
10/23/06  79 MB coffee
10/23/06  27 MB darth
10/23/06   4  B darth
......cut short for readability

It goes on and on.  Any tips would be greatly appreciated.

Thanks,

Bill

--
William Fennell
UNIX Administrator
Channing Laboratory

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

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>