Script to report on Oracle's trace files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script to report on Oracle's trace files
# 1  
Old 02-18-2010
Script to report on Oracle's trace files

Hi All,

Does anyone have any shell script out there that looks into Oracle trace files generated in the bdump, cdump & udump directories & reports on the contents (errors) within these files.
Your help is highly appreciated.

Regards,

- divroro12 -
# 2  
Old 02-19-2010
Can you explain your requirement a bit more.

As per my understanding u need to check the trace files for word "error" and print that line to console.

Am i correct?
# 3  
Old 02-19-2010
Actually by "error" i mean the following entries: "Error", "WARN", "ORA" that are created within the trace files.
And yes, we need to check the trace files for these words & either send the output to another file or print to the console.

- divroro12 -
# 4  
Old 02-19-2010
On our system we stop/start Oracle every day to allow for a backup.
This process generates one alert log and one ".trc" log for the start and another pair for the stop. By using a set of logs saved from a good day it is possible to use this list as a reference list of "normal" messages. The script needs to ignore lines which normally change such as datestamp lines, "mount id" lines and redo log switches.

It is then a simple task to extract any exception messages from current logs by eliminating "normal" messages. This method also spots when people change Oracle startup parameters.

Note: The absence of a log can be a sign of big trouble.
# 5  
Old 02-22-2010
you can use grep

to show on console
Code:
/usr/xpg4/bin/grep -E 'Error|WARN|ORA' " YOUR PATH of trace files"

or redirect to a log file

Code:
/usr/xpg4/bin/grep -E 'Error|WARN|ORA'  "our ora path" >> ORAError.log

# 6  
Old 02-22-2010
The problem with grep of the string "ORA" from these logs is that it occurs in normal day-to-day messages.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

awk script to find repeated IP adress from trace file (.tr)

+ 8.00747 /NodeList/0/DeviceList/0/$ns3::PointToPointNetDevice/TxQueue/Enqueue ns3::PppHeader (Point-to-Point Protocol: IP (0x0021)) ns3::Ipv4Header (tos 0x0 DSCP Default ECN Not-ECT ttl 63 id 0 protocol 17 offset (bytes) 0 flags length: 540 10.1.3.3 > 10.1.2.4) ns3::UdpHeader (length: 520 49153 >... (11 Replies)
Discussion started by: Nipa
11 Replies

2. AIX

Making a trace for a script

Hello experts, I'm trying to make a trace (unix log) in hope to see why I have differences in some bases : I putted at the first { and in the last line } > $DATA_SAS 2>&1 Is it a right command ? Do you have another solution ? thank you, regards, (7 Replies)
Discussion started by: rimob
7 Replies

3. Shell Programming and Scripting

Line count of trace files for 24 period

Hi, Using solaris 10 5.10 o/s I am learning awk as I work here on the job. What I need to do is isolate the trace file for the last 24 hours. After that I need to open those trace files and search for 'TNS-|ORA-' message from each one. These trace files MAY HAVE an occurance of them. I... (5 Replies)
Discussion started by: bdby
5 Replies

4. Shell Programming and Scripting

How to put a trace on shell script running in AIX?

Please help me in putting a trace on shell script running in AIX Best regards, Vishal (3 Replies)
Discussion started by: Vishal_dba
3 Replies

5. Solaris

Ping trace telnet monitoring script

Hello, it is my first post :) I need to implement some monitoring tools in a script, ping telnet traceroute I found this one to ping, it works, #!/bin/sh for i in `cat /tmp/PingStatus.txt` do ping -c 5 -w 5 -n $i | grep -q "bytes from" && echo "$i is OK" || opcmsg object=PING a=OS... (5 Replies)
Discussion started by: marmellata
5 Replies

6. UNIX for Dummies Questions & Answers

How to trace the big files causing high disk usage

Hi All, One very urgent issue and I need your help. I have two V490 servers installed with Sun Solaris 10. I have traced out that the disk usage is running out of space for both the servers. Currently the /dev/md/dsk/d10 device is 91% in one server and another is 56% and it is increasing... (1 Reply)
Discussion started by: ailnilanjan
1 Replies

7. Shell Programming and Scripting

Cron Script report new files in directory

Hello, I have a folder on my Redhat linux box that .core files are dropped into when some software we have crashes. At the moment we don't have a way to know if there has been a crash without visiting this directory manually and seeing if there are any new .core files. Can anyone think of a... (3 Replies)
Discussion started by: michaelb1984
3 Replies

8. UNIX for Advanced & Expert Users

How to write Flat Files by shell script using Oracle Database

Hello There.. I came to a situation where I need to write flat files using shell scripts, I need to pull the records from the oracle database and create the flat file, This process should be automated. Can any shell script expert out here to help me.. please.. Will be really glad to... (3 Replies)
Discussion started by: coolbuddy
3 Replies

9. Shell Programming and Scripting

Script to move trace files

Please debug this shell script for me.. Basically the idea is to run the script, based on the command to move some trace files to a separate directory and I am getting the error. Only the COMMAND that has rm {} works and I basically want to use it for the fourth one. Please try for the 2nd, 3rd and... (4 Replies)
Discussion started by: ST2000
4 Replies
Login or Register to Ask a Question