Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Need help locating correct trace file.

Re: Need help locating correct trace file.

From: <tgphelps50_at_my-deja.com>
Date: Fri, 19 Jan 2001 22:02:44 GMT
Message-ID: <94adhv$7q8$1@nnrp1.deja.com>

In article <949ut9$pkq$1_at_nnrp1.deja.com>,   afairch_at_phaedo.com wrote:
> Does anyone know a
> simple and more importantly reliable way to determine what process
 that
> is. My fallback plan is to make some educated guesses based on the
 date
> and time stamp on the file, but that does leave more room for error
> than I would like.

I've been using the following method for a couple of years now, and have never had a failure. It isn't foolproof, but it has worked perfectly so far. I search for a trace file that (1) was written in the past 24 hours (maybe you can do better than this with a little effort), and (2) contains the string "CONTROLFILE". My script runs the following two lines:

cd $ADMIN/prod/udump
grep CONTROLFILE `find . -mtime -1 -print` |cut -f 1 -d : >/tmp/$$

The "find" locates all fairly newly-written files, the "grep" locates all occurrences of CONTROLFILE in those files, and the "cut" extracts the filename and writes it to a temporary file. Now I have the name of the file, and can do whatever I want with it. (If the grep finds more than one match, you'll have problems.)

For now, I simply email the trace file to myself, by doing the following:

TRACE=`cat /tmp/$$`
mailx -s "Oracle trace file" myself_at_domain.net <$TRACE

If you get a foolproof way, let us know.

Sent via Deja.com
http://www.deja.com/ Received on Fri Jan 19 2001 - 16:02:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US