Re: How to get the Status history of the backups
Posted in 2006
Topics: Backup & Restore
anandaravi.ramasamy@gmail.com wrote:
> Hi,
>
> Is there any system tables which holds the status of the backups
> performed, If someone point me the right query it would be greatfull.
>
> Thanks
onstat -g arc gives you these info. (IDS V10) and I normally usefollowing script for this:
#!/bin/ksh
logfile=`onstat -m | grep "Message Log File" | awk '{ print $4 }' `
echo
echo "Ontape Archive Log"
echo " "
echo
"======================================================================="
echo "LEVEL START DATE/TIME FINISH DATE/TIME STATUS
DURATION"
echo "
HH:MM:SS"
echo
"======================================================================="
grep -e Archive -e 2006 $logfile | grep -v "Process exited" | awk '{
# if ( $5 == "2002" )
# if ( $5 == "2003" )
# if ( $5 == "2004" )
# if ( $5 == "2005" )
if ( $5 == "2006" )
{ t_date=$1" "$2" "$3 }
if ( $2 == "Level" )
{ printf("\\n %1s %-10s %8s ", $3, t_date, $1)
s_time=$1 }
if ( $2 == "Archive" )
{ printf("%-10s %8s %-10s", t_date, $1, $NF)
f_time=$1
#
#Following is to get archive duration
#
#
#generate start time info
#
s_hh=substr(s_time,1,2)
s_mm=substr(s_time,4,2)
s_ss=substr(s_time,7,2)
s_h2s= s_hh * 60 * 60
s_m2s= s_mm * 60
s_s2s= s_ss
s_totsec= s_h2s + s_m2s + s_s2s
#
#generate finish time info
#
f_hh=substr(f_time,1,2)
f_mm=substr(f_time,4,2)
f_ss=substr(f_time,7,2)
if ( f_hh < s_hh )
{ f_hh= f_hh + 24 }
f_h2s= f_hh * 60 * 60
f_m2s= f_mm * 60
f_s2s= f_ss
f_totsec= f_h2s + f_m2s + f_s2s
#
#Take difference between start time and end time
#
d_totsec= f_totsec - s_totsec
#
#Calculate the difference in HH:MM:SS
#
d_hh= int( d_totsec / 3600 )
d_totsec= d_totsec - d_hh * 3600
d_mm= int( d_totsec / 60 )
d_totsec= d_totsec - d_mm * 60
d_ss=d_totsec
if ( length(d_hh) < 2 )
{ d_hh="0"d_hh }
if ( length(d_mm) < 2 )
{ d_mm="0"d_mm }
if ( length(d_ss) < 2 )
{ d_ss="0"d_ss }
d_time=d_hh":"d_mm":"d_ss
printf(" %8s",d_time) }
}'
echo
echo
Thanks.
<snip>
onstat -g arc gives you these info. (IDS V10) and I normally usefollowing script for this:
<snip>
onstat -g arc merely shows that a backup has started and not that ithas successfully completed or even failed. I would be interested to
know if in IDS 10 it does actually report failure/success, as otherwise
I see very little point in this onstat command, apart from showing that
a back has started.....Which is great, but I'm more interested if its
successfuly completed.
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g