[rrd-users] Re: Capturing Times in ms...

Raymond Vermeer r.vermeer at ptt-post.nl
Fri Sep 14 10:04:05 MEST 2001


Dennis,

why not do the following :

make a perl script that does the following :

#!/usr/bin/perl

open(PIPE,'sqlplus -s <un>/<pw>@<db> @tst.sql|');
 while (<PIPE>) {
  chomp;
  $output = "$_";
 }
 close (PIPE);
print "$output\n";

The SQL script is the following :

set timing on
set pagesize 0
set feedback off
select * from dual; -- put here your own SQL script
exit

Good luck,
Raymond Vermeer
 
PTT Post / Dox & Data/Tri-C
Tauber 52 (kamer TA 168)
2267 ED Leidschendam
Tel (070) 33 42 298
Fax (070) 33 44 426
r.vermeer at ptt-post.nl <mailto:r.vermeer at ptt-post.nl>


> -----Oorspronkelijk bericht-----
> Van: rrd-users-bounce at list.ee.ethz.ch
> [mailto:rrd-users-bounce at list.ee.ethz.ch]namens Schroeder, Dennis
> Verzonden: Thursday, September 13, 2001 11:44 PM
> Aan: rrd-users at list.ee.ethz.ch
> Onderwerp: [rrd-users] Capturing Times in ms...
>
>
> All,
>
> Thanks for the recent help with PERL programming!
>
> I have another need for which I think you can help me.  I am working with
> one of our Oracle developers here to create a script (to run at command
> line) that will attach to an Oracle database over a WAN and
> execute a query.
> I want to use PERL to call this script, and time how long it takes from
> beginning to end...stuffing that data into an RRD.  To do this, I
> will have
> to follow a procedure something like this:
>
>   capture current time (begin)
>   execute database script
>   capture current time (end)
>   subtract begin from end to get elapsed time
>   stuff elapsed time into the RRD
>
> My question is this:  How small of a time increment is PERL capable of
> measuring in?  This will only work if PERL can measure small enough
> increments, so that the difference between one running of the program and
> the next can be seen.
>
> I have the program for doing the PINGs up and running.  We want to compare
> the graphs of the PINGs and the program I'm working on now to see if the
> peaks correspond, or if they occur at different times.
>
> Thanks!
>
> -----------------------------------------------------------------
> Dennis Schroeder                                ||        ||
> Network Engineer                                ||        ||
> SANMINA Global Network Services                ||||      ||||
> Phone:  602-824-8431                       ..:||||||:..:||||||:..
> Mobile: 602-432-3258                          Cisco  Certified
> Email:  dennis.schroeder at sanmina.com         Network  Associate
> -----------------------------------------------------------------
> Nothing in the world is more dangerous than sincere ignorance
> and conscientious stupidity.             -Martin Luther King, Jr.
> -----------------------------------------------------------------
>
>
> --
> Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive     http://www.ee.ethz.ch/~slist/rrd-users
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
>


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list