The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > UNIX and Linux Applications
Google UNIX.COM


UNIX and Linux Applications Questions involving software not covered by other forum go here. This includes Databases and Middleware.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
redirect exception messages from program mpang_ Shell Programming and Scripting 1 12-14-2006 07:21 AM
Help with RPC Exception ejbrever HP-UX 2 08-24-2006 11:08 AM
URGENT:Program is not dropping core on customer AIX Machine khan_069 AIX 1 05-10-2006 05:49 AM
Very Urgent help required in Shell Program Suppandi Shell Programming and Scripting 1 12-09-2005 04:33 AM
Urgent!! How to write a shell program to execute command to access internet? firebirdonfire UNIX for Dummies Questions & Answers 2 04-26-2001 08:16 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-20-2008
Registered User
 

Join Date: Jan 2008
Posts: 21
Thumbs up Urgent---Program for getting Exception from a log

Hi Friends,

I am new to Unix,

Now I am Working with shell scripting in my company

Description:-By executing that script I need to get the exception from the log file
I need the program for getting the Exceptions from the logfile,,and that program should be generic...I mean if i want to get the exception from any directory i need to get the exception without any changes or very small chenges in script

If you can help me out,,it will be really very helpful,,

Thanks alot In Advance
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-20-2008
Registered User
 

Join Date: Jan 2008
Posts: 21
Hi Guys,
Any help in the above request????????

Thanks in advance
Reply With Quote
  #3 (permalink)  
Old 02-20-2008
Registered User
 

Join Date: Feb 2008
Location: Fairfax VA
Posts: 9
Finding exceptions RFI

How are you identifying an exception? Seems if it's key word or some string grep would do it.

Giving us a definition of exception would be very useful to solving this.
Reply With Quote
  #4 (permalink)  
Old 02-21-2008
Registered User
 

Join Date: Jan 2008
Posts: 21
Actually The Logfile will contains Different type exceptions.
for example ,Java exceptions , database related exceptions,

sample exception snippet from the log file

2007-11-13 05:12:43,899 - [ERROR] : Threadid = 32, While executing [invoke] enco
untered [com.get.prodapi.exception.ProductNotFoundException] : [Could
not find Product data for fii = 32637174 at
com.get.prodapi.dao.ProductDAO.getProductInfoByFii(ProductDAO.java:782)]
at com.tibco.plugin.java.JavaActivity.eval(JavaActivity.java:395)
at com.tibco.pe.plugin.Activity.eval(Activity.java:209)
at com.tibco.pe.core.TaskImpl.eval(TaskImpl.java:541)
at com.tibco.pe.core.Job.a(Job.java:709)
at com.tibco.pe.core.Job.l(Job.java:499)
at com.tibco.pe.core.JobDispatcher$JobCourier.a(JobDispatcher.java:249)
at com.tibco.pe.core.JobDispatcher$JobCourier.run(JobDispatcher.java:200
)


This is one of the exception from the log file...
I dont want to go and explicitly see for the how many Exceptions are there and what are the exceptions in the log file...

By Executing my Generic script I want to get the exceptions from the log file which ever I will specify

I think this would be very clear

Appriciate your help.

Thanks In Advance,
Anji
Reply With Quote
  #5 (permalink)  
Old 02-21-2008
Moderator
 

Join Date: Dec 2003
Location: /ksh93
Posts: 880
Show us what you have come up with so far for a solution.
Reply With Quote
  #6 (permalink)  
Old 02-21-2008
Registered User
 

Join Date: Jan 2008
Posts: 21
I am completely new to shell scripting,,
But also with a searching I did some code which will grep the Exception from the log file,,,,but I want to get the whole exceptions from the log file

I cant show up my code for security purpose(bcoz my collegues are also be the part of this forum only),but I can show you up the same code like that

for example snippet which we can modify for our requirements

grep $1 Exmple.log | awk 'BEGIN {i=0} {i=i+$1} END {print (i)}'

it searches for a pattern
i is a variable
$1 means search pattern and
Example.log is the filename to be searched


Can you help me out this please?


Thanks Guys
Anji
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:36 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0