The gettimeofday() function obtains the current time, expressed as
seconds and microseconds since 00:00 Coordinated Universal Time
(UTC),
January 1, 1970, and stores it in the timeval structure pointed
to by
tp. The resolution of the system clock is unspecified.
The getrusage() function provides measures of the resources used by
the current process or its terminated and waited-for child
processes.
If the value of the who argument is RUSAGE_SELF, information is
returned about resources used by the current process. If the value
of
the who argument is RUSAGE_CHILDREN, information is returned about
resources used by the terminated and waited-for children of the
current process. If the child is never waited for (for instance,
if
the parent has SA_NOCLDWAIT set or sets SIGCHLD to SIG_IGN), the
resource information for the child process is discarded and not
included in the resource information provided by getrusage(). The
r_usage argument is a pointer to an object of type struct rusage
in
which the returned information is stored
times() fills the structure pointed to by buffer with time-accounting
information. The structure defined in <sys/times.h> is as
follows:
struct tms {
clock_t tms_utime; /* user time */
clock_t tms_stime; /* system time */"
clock_t tms_cutime; /* user time, children */
clock_t tms_cstime; /* system time, children */
};
This information comes from the calling process and each of its
terminated child processes for which it has executed a wait(),
These are from HPUX 11.11. In HPUX and all other unix execute man <your
command or system call> to get more information.
Allan
-----Original Message-----
Boris Dali
Sent: Wednesday, December 03, 2003 12:29 PM
To: Multiple recipients of list ORACLE-L
Is this true? strace-ing on linux shows gettimeofday
calls (for e) and getrusage (for c) - just like Cary
describes. On HP however tusc-ing a simple "select *
from dual" issued from sqlplus I see:
calls sys call
----- --------
1 gettimeofday()
1 getrusage()
15 times()
Which sys call is used for what?
Guess I can turn timed_statistics off and see how it
affects the (amount of) sys calls issued
Thanks,
Boris Dali.
- Niall Litchfield
<niall.litchfield_at_dial.pipex.com> wrote: > <me> reads Jonathan's
description and blushes</me>
>
> So it'll be a *feature* and not a bug then. IIRC e
> comes from POSIX
> gettimeofday calls on all platforms except Windows
> -- where it looks
> like GetTickCount. If this is true then the accuracy
> of e will be
> limited by the accuracy of gettimeofday.
>
> Niall
>
> > -----Original Message-----
> > From: ml-errors_at_fatcity.com
> [mailto:ml-errors_at_fatcity.com] On
> > Behalf Of Niall Litchfield
> > Sent: 02 December 2003 22:24
> > To: Multiple recipients of list ORACLE-L
> > Subject: RE: raw traces - EXEC: c=10,000 e=40
> >
> >
> > I'd be highly, highly suspicious of the cpu time
> c.
> >
> > 1. You should be able to verify (roughly the
> elapsed time) of
> > the statement, if by no other means than running
> in sqlplus
> > with timing on.
> > 2. 3 statements with *exactly* the same cpu time -
> all in
> > very very round numbers. Seems unlikely to me.
> >
> > Might be an hp-ux bug but as I don't have HP-UX to
> play with
> > that is speculation of the first order.
> >
> > Niall
> >
> > > -----Original Message-----
> > > From: ml-errors_at_fatcity.com
> [mailto:ml-errors_at_fatcity.com] On
> > > Behalf Of Boris Dali
> > > Sent: 02 December 2003 20:49
> > > To: Multiple recipients of list ORACLE-L
> > > Subject: raw traces - EXEC: c=10,000 e=40
> > >
> > >
> > > Reading Cary's book I understand that c and e
> are
> > > measured via different system calls (haven't
> truss'ed
> > > [well tusc'ed] them yet - I am on HP-UX 11.11),
> but
> > > would anybody know what the reasonable upper
> limit of
> > > c-e might be?
> > >
> > > I am looking at the trace file where c is more
> than
> > > two orders of magnitude greater than e, which
> make me
> > > wonder if I a have some anomaly on my system
> > >
> > > Some examples:
> > >
> > > EXEC
> > >
> >
>
#98:c=10000,e=433,p=0,cr=2,cu=2,mis=0,r=1,dep=1,og=4,tim=1777312113968
> > >
> > > EXEC
> > >
>
#110:c=10000,e=390,p=0,cr=1,cu=3,mis=0,r=1,dep=1,og=4,tim=1777
> > > 312181650
> > >
> > > PARSE
> > >
> >
>
#103:c=10000,e=40,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1777314524922
> > >
> > > Oracle 9.2.0.4.0 on HP-UX 11.11
> > >
> > > Thanks,
> > > Boris Dali.
> > >
> > >
>
> > > ________
> > > Post your free ad now! http://personals.yahoo.ca
> > > --
> > > Please see the official ORACLE-L FAQ:
> http://www.orafaq.net
> > > --
> > > Author: Boris Dali
> > > INET: boris_dali_at_yahoo.ca
> > >
> > > Fat City Network Services -- 858-538-5051
> http://www.fatcity.com
> > > San Diego, California -- Mailing list and
> web
> > hosting services
> > >
> >
>
> > > To REMOVE yourself from this mailing list, send
> an E-Mail message
> > > to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru')
> > > and in the message BODY, include a line
> containing: UNSUB
> > > ORACLE-L (or the name of mailing list you want
> to be removed
> > > from). You may also send the HELP command for
> other
> > > information (like subscribing).
> > >
> >
> > --
> > Please see the official ORACLE-L FAQ:
> http://www.orafaq.net
> > --
> > Author: Niall Litchfield
> > INET: niall.litchfield_at_dial.pipex.com
> >
> > Fat City Network Services -- 858-538-5051
> http://www.fatcity.com
> > San Diego, California -- Mailing list and
> web hosting services
> >
>
> > To REMOVE yourself from this mailing list, send an
> E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB
> ORACLE-L
> > (or the name of mailing list you want to be
> removed from). You may
> > also send the HELP command for other information
> (like subscribing).
> >
>
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.net
> --
> Author: Niall Litchfield
> INET: niall.litchfield_at_dial.pipex.com
>
> Fat City Network Services -- 858-538-5051
> http://www.fatcity.com
> San Diego, California -- Mailing list and web
> hosting services
>
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
Post your free ad now!
http://personals.yahoo.ca
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Boris Dali
INET: boris_dali_at_yahoo.ca
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the
message BODY, include a line containing: UNSUB ORACLE-L (or the name of
mailing list you want to be removed from). You may also send the HELP
command for other information (like subscribing).
______________________________________________________________________________
This email is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Copying, forwarding or distributing this message by persons or entities other than the addressee is prohibited. If you have received this email in error, please contact the sender immediately and delete the material from any computer. This email may have been monitored for policy compliance. [021216]
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Nelson, Allan
INET: anelson_at_midf.com
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Wed Dec 03 2003 - 12:59:25 CST