need help in detecting errors


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting need help in detecting errors
# 1  
Old 02-22-2011
Java need help in detecting errors

Hi All ,

I need a script to find errors in a particular and in a particular path

Actually in my logs i`ve so many kinds of errors(i can even say as 100 types also).if i run the script i need to know the error (some errors can aviod )

so finally the script o/p should be a numeric (0,1,2...)

that numeric is equal to number of errors.

can you please provide me in detail with an example script.

thx in adv
# 2  
Old 02-22-2011
We can't make a script to find errors until we have some idea what the errors look like.
# 3  
Old 02-22-2011
we can do that by using Databse.
normally we can't do for that 100 types of errors.
if you want stil then you have to use switch case.

regards
rajesh
# 4  
Old 02-22-2011
Hm. You may be able to do what you want with
Code:
grep -f errorlist logfile

grep will match every regex in errorlist against logfile and print lines that match. It will expect the strings in errorlist to be regular expressions, one per line.

You can make it use errorlist as a list of fixed strings instead with
Code:
grep -F -f errorlist logfile

Beware: If you leave any blank lines in the error list, it will interpret that blank line as an empty regex which will always match anything and everything.

Unfortunately, I can't fulfill your exact requirements until I have some idea what the log and the errors look like.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

AIX not detecting LUN

Hello All, Really hoping someone can help. We have an AIX server connected to a Quantum SDLC sitting in front of an S10K library. The library has 3 logical partitions (two LTO4, one LTO3), so it requires 3 distinct medium changers. The SDLC presents the 3 luns (which are the medium... (1 Reply)
Discussion started by: jwholey
1 Replies

2. Solaris

Detecting Harddrive Errors

I am looking for some tips or suggestions in how to do the following. 1) From a Solaris server, I run the command iostat -En and receive output that is similiar to the following which shows your disks along with the cdrom/dvdrom: c0t2d0 Soft Errors: 0 Hard Errors: 0 Transport... (1 Reply)
Discussion started by: sunsysadm2003
1 Replies

3. Shell Programming and Scripting

Detecting hard or soft disk errors in Solaris

I am looking for some tips or suggestions in how to do the following. 1) From a Solaris server, I run the command iostat -En and receive output that is similiar to the following which shows your disks along with the cdrom/dvdrom: c0t2d0 Soft Errors: 0 Hard Errors: 0 Transport... (1 Reply)
Discussion started by: sunsysadm2003
1 Replies

4. Programming

Detecting interruptions in C

Hi. You may know how to detect when a interruption succeeded programming in C. Just like receiving a signal without blocking. Knowing when it was a keystroke (IRQ 2), or a mouse movement (12), or a disk access, etc. and getting actually for example the letter typed. Thanks a lot. (7 Replies)
Discussion started by: Ashrentum
7 Replies

5. UNIX for Dummies Questions & Answers

Major OS errors/Bash errors help!!!!

Hi all, dummy here.... I have major errors on entering the shell. On login I get: -bash: dircolors: command not found -bash: tr: command not found -bash: fgrep: command not found -bash: grep: command not found -bash: grep: command not found -bash: id: command not found -bash: [: =: unary... (12 Replies)
Discussion started by: wcmmlynn
12 Replies

6. UNIX for Dummies Questions & Answers

Detecting Second disk

Hello all, first of all, I apologise if I may ask stupid or obvious questions, but I'm new to UNIX and I think I need a little bit of help before I start gearing up :) Anyway, I have installed a Solaris 8 on a Sun machine, and it has 2 physical disks in it. However, it seems that it is only... (7 Replies)
Discussion started by: dragunu
7 Replies

7. Programming

detecting errors in writing to syslog

I am calling "void syslog(int, const char *, ...);" from my c++ application (definition taken from man page for syslog.h". Is there any way to detect that the syslog is not working, so that I can re-direct logging information to stderr? Thanks in advance. David (2 Replies)
Discussion started by: dmirza
2 Replies

8. AIX

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (2 Replies)
Discussion started by: mcastill66
2 Replies

9. UNIX for Advanced & Expert Users

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (0 Replies)
Discussion started by: mcastill66
0 Replies

10. UNIX for Dummies Questions & Answers

detecting drives

I know that Unix is different from windows in that it needs more manual configuring but how do I get Solaris 8 (Intel version) to recognize my floppy drive and cd-rom?? I mean does it automatically detect the drives at startup and I have to mount them or do I have to create the drives somehow and... (1 Reply)
Discussion started by: eloquent99
1 Replies
Login or Register to Ask a Question