Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a report of amount backed up per client.

Status
Not open for further replies.

bse1969

IS-IT--Management
Dec 10, 2004
55
US
I need a report that tells me the total amount that legato has backed up on a per client basis.
 
well you are asking for something pretty broad... mminfo is powerful and you can use that for reporting.

here is an example query that I use to send out to customers for their daily report.

mminfo -c client_name_goes_here -t yesterday -r 'client(20),space,space,space,name,savetime(7),space,space,level(6),space,space,nfiles(9),totalsize(15)'
 
That is almost what I am looking for. mminfo may not be able to do exactly what I am looking for, but that report is close.

Instead of it listing every name, can it consolidate to listing the clients once and then give me a total size?
 
Try "mminfo -aX -q client=client_name", this gives you a pretty nice summary report. You can ofcourse use more querys than just "client=" to restrict your search. But if you use the -r flag, i think that NW will list every saveset available for the current.
 
Then there's the Networker Management Console product that will produce fancier reports on a per client basis if you like.

 
Hi,

I'm running NetWorker on Solaris and have written a script that will do this. If you're running NetWorker on Windows, sorry................

Here it is:

#!/bin/ksh
# Script Name: sizeutil.ksh
# Purpose: Report amount of data backed-up by Legato
#
# Changes:
# Simplify menus
# Show backup level when looking up by specific date and what was backed up by group.
BOLD=`tput smso`
UNBOLD=`tput rmso`
CLIENT ()
{
mminfo -a -r client | uniq
}
#
start_date ()
{
clear
print "The date can be entered in several different forms \n"
#
print "1. TOD. A tod time of day, which is of the form \
hh[:mm[:ss]] (or hhmm) [meridian] [zone]. If no meri\
dian - am or pm - is specified, a 24-hour clock is \
used. A tod may be specified as just hh followed by a \
meridian. If no zone (for example, GMT) is specified, \
the current timezone, as determined by the second \
parameter, now, is assumed. \n"
print "For example: 10:15 am or 23:15 \n"
#
print "2. Date. A Date is a specific month and day, and \
possibly a year. The acceptable formats are mm/dd[/yy] \
and monthname dd [yy]. If omitted, the year defaults to \
the current year. If a year is specified as a number in \
the range 70 and 99, 1900 is added. If a year is in \
the range 00 and 30, 2000 is added. The treatment of \
other years less than 100 is undefined. If a number \
not followed by a day or relative time unit occurs, it \
will be interpreted as a year if a tod, monthname, and \
dd have already been specified; otherwise, it will be \
treated as a tod. \n"
print "For example: 05/15/04 or 03/17 \n"
#
print "3. Relative Time. Specifications relative to \
the current time are also accepted. The format is \
[number] unit; acceptable units are year, month, \
fortnight, week, day, hour, minute, and second. \n"
print "For example: last week or two weeks ago \n"
}
MMINFO1 ()
{
start_date
let "QUIT = `CLIENT | wc -l` + 1"
print "Start Date: \c"
read STARTDATE
PS3="Enter the $BOLD NUMBER $UNBOLD for your client selection or $BOLD $QUIT $UNBOLD to exit this menu: "
select NAME in `CLIENT` "Quit"
do
case $NAME in
Quit)
break
;;
*)
mminfo -a -t "'$STARTDATE'" -c $NAME -r totalsize | awk '{ ssum += $1/1073741824 } \
END { print ssum, "GB" }' | tr -s "." ","
;;
esac
done
}
#
MMINFO2 ()
{
start_date
let "QUIT = `CLIENT | wc -l` + 1"
print "Start Date: \c"
read STARTDATE
PS3="Enter the $BOLD NUMBER $UNBOLD for your client selection or $BOLD $QUIT $UNBOLD to exit this menu: "
select NAME in `CLIENT` "Quit"
do
case $NAME in
Quit)
break
;;
*)
mminfo -a -c $NAME -q "sscreate>=$STARTDATE" -r "totalsize,sscreate" | grep $STARTDATE | awk '{ ssum += $1/107374
1824 } \
END { print ssum, "GB" }' | tr -s "." ","
;;
esac
done
}
#
MMINFO3 ()
{
start_date
print "Start Date: \c"
read STARTDATE
mminfo -a -t "'$STARTDATE'" -r totalsize | awk '{ ssum += $1/1073741824 } \
END { print ssum, "GB" }' | tr -s "." ","
print "1. (R)eturn to main Menu"
print "2. (E)nter new date \n"
print "Please enter your Selection: \c"
read option
case $option in
1|R|r)
show_menu ;;
2|E|e)
MMINFO3
;;
esac
}
#
MMINFO4 ()
{
clear
print "A date is a specific month and day, and \
possibly a year. The acceptable formats are mm/dd[/yy] \
and monthname dd [yy]. If omitted, the year defaults to \
the current year. If a year is specified as a number in \
the range 70 and 99, 1900 is added. If a year is in \
the range 00 and 30, 2000 is added. The treatment of \
other years less than 100 is undefined. If a number \
not followed by a day or relative time unit occurs, it \
will be interpreted as a year if a tod, monthname, and \
dd have already been specified; otherwise, it will be \
treated as a tod. \n"
print "For example: 05/15/04 or 03/17 \n"
print "Start Date: \c"
read STARTDATE
mminfo -a -q "sscreate>=$STARTDATE" -r "totalsize,sscreate" | grep $STARTDATE | awk '{ ssum += $1/1073741824 } \
END { print ssum, "GB" }' | tr -s "." ","
print "1. (R)eturn to main Menu"
print "2. (E)nter new date \n"
print "Please enter your Selection: \c"
read option
case $option in
1|R|r)
show_menu ;;
2|E|e)
MMINFO4
;;
esac
}
#
MMINFO5 ()
{
clear
print "A date is a specific month and day, and \
possibly a year. The acceptable formats are mm/dd[/yy] \
and monthname dd [yy]. If omitted, the year defaults to \
the current year. If a year is specified as a number in \
the range 70 and 99, 1900 is added. If a year is in \
the range 00 and 30, 2000 is added. The treatment of \
other years less than 100 is undefined. If a number \
not followed by a day or relative time unit occurs, it \
will be interpreted as a year if a tod, monthname, and \
dd have already been specified; otherwise, it will be \
treated as a tod. \n"
print "For example: 05/15/04 or 03/17 \n"
let "QUIT = `CLIENT | wc -l` + 1"
print "Start Date: \c"
read STARTDATE
print "END Date: \c"
read ENDDATE
PS3="Enter the $BOLD NUMBER $UNBOLD for your client selection or $BOLD $QUIT $UNBOLD to exit this menu: "
select NAME in `CLIENT` "Quit"
do
case $NAME in
Quit)
break
;;
*)
mminfo -a -q "sscreate>=$STARTDATE,sscreate<=$ENDDATE" -c $NAME -r totalsize | awk '{ ssum += $1/1073741824 } \
END { print ssum, "GB" }' | tr -s "." ","
;;
esac
done
}
#
MMINFO6 ()
{
clear
print "A date is a specific month and day, and \
possibly a year. The acceptable formats are mm/dd[/yy] \
and monthname dd [yy]. If omitted, the year defaults to \
the current year. If a year is specified as a number in \
the range 70 and 99, 1900 is added. If a year is in \
the range 00 and 30, 2000 is added. The treatment of \
other years less than 100 is undefined. If a number \
not followed by a day or relative time unit occurs, it \
will be interpreted as a year if a tod, monthname, and \
dd have already been specified; otherwise, it will be \
treated as a tod. \n"
print "For example: 05/15/04 or 03/17 \n"
print "Start Date: \c"
read STARTDATE
print "END Date: \c"
read ENDDATE
mminfo -a -q "sscreate>=$STARTDATE,sscreate<=$ENDDATE" -r totalsize | awk '{ ssum += $1/1073741824 } \
END { print ssum, "GB" }' | tr -s "." ","
print "1. (R)eturn to main Menu"
print "2. (E)nter new dates \n"
print "Please enter your Selection: \c"
read option
case $option in
1|R|r)
show_menu ;;
2|E|e)
MMINFO6
;;
esac
}
#
MMINFO7 ()
{
clear
print "A date is a specific month and day, and \
possibly a year. The acceptable formats are mm/dd[/yy] \
and monthname dd [yy]. If omitted, the year defaults to \
the current year. If a year is specified as a number in \
the range 70 and 99, 1900 is added. If a year is in \
the range 00 and 30, 2000 is added. The treatment of \
other years less than 100 is undefined. If a number \
not followed by a day or relative time unit occurs, it \
will be interpreted as a year if a tod, monthname, and \
dd have already been specified; otherwise, it will be \
treated as a tod. \n"
print "For example: 05/15/04 or 03/17 \n"
print "Start Date: \c"
read STARTDATE
print "END Date: \c"
read ENDDATE
for i in `CLIENT`
do
print "$i: \c"
mminfo -a -q "sscreate>=$STARTDATE,sscreate<=$ENDDATE" -c $i -r totalsize | awk '{ ssum += $1/1073741824 } \
END { print ssum, "GB" }' | tr -s "." ","
done
print "1. (R)eturn to main Menu"
print "2. (E)nter new dates \n"
print "Please enter your Selection: \c"
read option
case $option in
1|R|r)
show_menu ;;
2|E|e)
MMINFO7
;;
esac
}
#
MMINFO8 ()
{
clear
print "A date is a specific month and day, and \
possibly a year. The acceptable formats are mm/dd[/yy] \
and monthname dd [yy]. If omitted, the year defaults to \
the current year. If a year is specified as a number in \
the range 70 and 99, 1900 is added. If a year is in \
the range 00 and 30, 2000 is added. The treatment of \
other years less than 100 is undefined. If a number \
not followed by a day or relative time unit occurs, it \
will be interpreted as a year if a tod, monthname, and \
dd have already been specified; otherwise, it will be \
treated as a tod. \n"
print "For example: 05/15/04 or 03/17 \n"
print "Start Date: \c"
read STARTDATE
for i in `CLIENT`
do
print "$i: \c"
mminfo -a -q "sscreate>=$STARTDATE" -c $i -r "totalsize,sscreate" | grep $STARTDATE | awk '{ ssum += $1/107374182
4 } \
END { print ssum, "GB" }' | tr -s "." ","
done
print "1. (R)eturn to main Menu"
print "2. (E)nter new dates \n"
print "Please enter your Selection: \c"
read option
case $option in
1|R|r)
show_menu ;;
2|E|e)
MMINFO8
;;
esac
}
#
show_menu ()
{
clear
banner "Size Util"
# sleep 1
# clear
print "\n"
print "Use either the $BOLD NUMBER $UNBOLD or $BOLD LETTER $UNBOLD in '() \n"
print "\n"
print '0) -- (M)enu Display\n'
print '1) -- (A)mount of Data in GB saved for a client from a specific date until now'
print '2) -- am(O)unt of Data in GB saved for a client on a specific date'
print '3) -- amo(U)nt of Data in GB saved for all clients from a specific date until now'
print '4) -- amou(N)t of Data in GB saved for all clients on a specific date'
print '5) -- (G)B of Data saved for a client for a specific Date Range'
print '6) -- G(B) of Data saved for all clients for a specific Date Range'
print '7) -- GB of Data saved for all (C)lients, by client, for a specific Date Range'
print '8) -- GB of Data saved for all c(L)ients, by client, for a specific Date'
print '9) -- (Q)uit this menu'
print "\n";
}
#
show_menu
test choice="0"
while true;
do

read choice?"Please make your choice? "
case $choice in
0|m|M)
print "reprinting menu......!\n"
show_menu;;
1|A|a)
MMINFO1
show_menu;;
2|O|o)
MMINFO2
show_menu;;
3|U|u)
MMINFO3
;;
4|N|n)
MMINFO4
;;
5|G|g)
MMINFO5
show_menu;;
6|B|b)
MMINFO6
;;
7|C|c)
MMINFO7
;;
8|L|l)
MMINFO8
;;
9|q|Q)
print "Quiting script.....\n"
sleep 1
clear
banner "Size Util"
sleep 1
exit 1;;
*)
print "Invalid choice (0) reprints menu"
print "\n";;
esac
done

Hope this helps!!

-Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top