Re: Backup Timings
Posted in 2000
Topics: Backup & Restore, Stored Procedures & SPL
abhay@cheerful.com wrote:
>
> Hi,
> I want to find the duration for the ontape backup.
> I know, I get this info in a message log but if I
> get the start and end times in Date-Time format, I can
> subtract easily.
Why not get them from your script then?
> Is there any sysmaster table for this info ?
Probably, but you won't find the start time.
> Where does onstat -g arc gets the info from ?
>From the reserved pages, but onstat -g arc doesn't display a start time
either. At least, not in my version.
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /|
| http://www.informix.com http://www.informixhandbook.com |///// / //|
| http://www.iiug.org +-----------------------------------+//// / ///|
| |What year 2000 bug? year 2000 bug? |/// / ////|
| |year 2000 bug? year 2000 bug? year |// / /////|
| |2000 bug? year 2000 bug? year 1900 |/ ////////|
+----------------------+-----------------------------------+-----------+
Here's a perl script that does just that - as per usual I give no gaurentees
and you should check everything before you run it.
#!/usr/bin/perl
require Mail::Send;
require Mail::Mailer;
$start = time;
$starttime = `date`;
chomp $starttime;
system ("@ARGV") == 0
or die "unix error, check your command ($?)\\n";
$end = time;
$elapsed = $end - $start;
@hms = ($elapsed/60/60,($elapsed/60)%60,$elapsed%60);
$endtime = `date`;
chomp $endtime;
$msg = new Mail::Send;
$msg = new Mail::Send Subject=>"run-time: @ARGV", To=>'';
$fh = $msg->open;
printf $fh "command:\\t@ARGV\\n";
printf $fh "start:\\t\\t$starttime\\n";
printf $fh "end:\\t\\t$endtime\\n";
printf $fh "elapsed:\\t%d hr, %d min, %d secs\\n",$hms[0],$hms[1],$hms[2];
$fh->close; # complete the message and send it
"Mark D. Stock" wrote:
> abhay@cheerful.com wrote:
> >
> > Hi,
> > I want to find the duration for the ontape backup.
> > I know, I get this info in a message log but if I
> > get the start and end times in Date-Time format, I can
> > subtract easily.
>
> Why not get them from your script then?
>
> > Is there any sysmaster table for this info ?
>
> Probably, but you won't find the start time.
>
> > Where does onstat -g arc gets the info from ?
>
> >From the reserved pages, but onstat -g arc doesn't display a start time
> either. At least, not in my version.
>
> Cheers,
> --
> Mark.
>
> +----------------------------------------------------------+-----------+
> | Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /|
> | http://www.informix.com http://www.informixhandbook.com |///// / //|
> | http://www.iiug.org +-----------------------------------+//// / ///|
> | |What year 2000 bug? year 2000 bug? |/// / ////|
> | |year 2000 bug? year 2000 bug? year |// / /////|
> | |2000 bug? year 2000 bug? year 1900 |/ ////////|
> +----------------------+-----------------------------------+-----------+
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