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!

Group run time 3

Status
Not open for further replies.

joeunixadmin

Technical User
Feb 10, 2003
53
DE
Hi,

All of our backups are controlled by groups and each group is of course assigned a schedule and I can easily determine when a group will start but would like to know when the group completes (other than completion messages). I know that the information is contained in the Completion Messages /nsr/logs/messages and /nsr/logs/daemon.log, but since these logs are so lengthy and the groups/clients are numerous am wondering if It might be possible to exctract the information using mminfo or a similar command.

Thanks!

-Joe
 
Maybe if you use Nsradmin to query the group ressources.
There must be a field that contains the group status.

(PS: If you can see in Hidden Attributes via the GUI, you'll be able to query it via nsradmin).
 
nsradmin
show completion
print type: NSR group

exit


should work. If it is null, it either has never run or is running.
 
Hi,

Thanks TDun for the tip but, the output doesn't state the completion time for the group.

Any other suggestions?

-Joe
 
You would really need to grab teh savegroup complete message from the daemon.log.
Do a grep(unix) or find (Windoze) for "savegroup notice" and then again for "completed" to get the lines with the group names and times.
 
If you have a windows installation use the gui go to server notification create a new notification in the action field enter the path and the name of a cmd script like this

d:\nsr\bin\blat -install ipname etc...
del d:\nsr\logs\temp_grp.log
d:\nsr\bin\nsrlog -f d:\nsr\logs\temp_grp.log
d:\nsr\bin\blat d:\nsr\logs\temp_grp.log -s "Savegroup information " -t email adress -i NETWORKER

rem : blat is a free little tools that send a file to a mail server it's easy to find on the internet

you gonna have for each group a separate mail with the begin and the end of the backup group
 
Hi,

two alternatives you could use:

1) If each group is a single client then you could issue a mminfo -avc'nsrservername' -t'24 hours ago' -r'sscomp(18),name'| grep "index:"
this would give you the saveset completion times for the individual client indices, which is going to be pretty much the same as the actual savegroup completion (give a couple of seconds).

2) Create a customized notification to run a script on completion of the savegroup
Action: scriptname.sh
Event: Savegroup
Priority: Alert / Notice (ignore alert if you don't want failures)

You can then pipe the savegroup completion report as input and grep any information you require.
We use the latter to produce comprehensive reports of backup stats - e.g. size, throughput etc

Hope this helps
 
KSK,

Thanks for your helpful tip.

I have written a script that gives me what I am looking for.

Here it is, maybe it will help someone else!

-Joe

#!/bin/sh
GROUP=`mminfo -v -r group | sort -u`
for i in $GROUP
do
mminfo -av -t '24hours ago' -q group=$i -r group -r 'sscomp(18)'|sort|tail -1
done
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top