Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
google site



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-09-2010
Registered User
 

Join Date: Feb 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
logfile parsing

I thought I was pretty handy with awk until I got this one.

I'm trying to parse a log file where the events could have different delimiters (2 scripts is ok), the errors are spread over multiple lines, and I"m trying to figure out how to not read the same lines that have already been read.

The purpose being that when the script sees something the output will be redirected to mail/snmptrap/etc.


Code:
11/13/2009 1:05:28 PM ---------------------------------------------------------
11/13/2009 1:05:52 PM FTP Error: The password was not allowed
11/13/2009 1:05:52 PM Agile ChangeCAST failed for the following reason:^M
FTP Error: The password was not allowed
11/13/2009 1:05:52 PM There were errors found on profile <1>. The profile will be set as disabled.
11/13/2009 1:05:52 PM ---------------------------------------------------------
11/13/2009 1:28:09 PM *************** JVM Error ***************
11/13/2009 1:28:09 PM Nov 13, 2009 1:28:08 PM oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER^M
WARNING: Exception returned by remote server: {0}^M
java.lang.NoClassDefFoundError: Lcom/agile/common/client/value/VOAudit;^M
        at java.lang.Class.getDeclaredFields0(Native Method)^M
        at java.lang.Class.privateGetDeclaredFields(Class.java:2232)^M
        at java.lang.Class.getDeclaredField(Class.java:1852)^M
        at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1555)^M
        at java.io.ObjectStreamClass.access$600(ObjectStreamClass.java:47)^M
        at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:381)^M
        at java.security.AccessController.doPrivileged(Native Method)^M
        at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:373)^M
        at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:268)^M
        at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:504)^M
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)^M
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)^M
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)^M
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)^M
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)^M
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)^M
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)^M
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)^M
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)^M
        at com.evermind.server.rmi.RMIClientConnection.handleMethodInvocationResponse(RMIClientConnection.java:856)^M
        at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:287)^M
        at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:242)^M
        at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:224)^M
        at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152)^M
        at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127)^M
        at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107)^M
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)^M
        at java.lang.Thread.run(Thread.java:595)^M
java.lang.NoClassDefFoundError: Lcom/agile/common/client/value/VOAudit;^M
        at com.evermind.server.rmi.RMICall.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMICall.java:109)^M
        at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:125)^M
        at com.evermind.server.rmi.RMIClientConnection.obtainRemoteMethodResponse(RMIClientConnection.java:517)^M
        at com.evermind.server.rmi.RMIClientConnection.invokeMethod(RMIClientConnection.java:461)^M
        at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:63)^M
        at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:28)^M
        at com.evermind.server.ejb.StatefulSessionRemoteInvocationHandler.invoke(StatefulSessionRemoteInvocationHandler.java:31)^M
        at __Proxy1.sendObject(Unknown Source)^M
        at com.agile.changecast.agileobjects.bridge.AgileObjectsBridge.sendObject(AgileObjectsBridge.java:542)
11/13/2009 1:28:09 PM *****************************************
11/13/2009 2:09:39 PM FTP: PutFile failed to upload CPIMAST015788: 200.
11/13/2009 2:09:39 PM An unknown error has occurred, please notify your system administrator. ChangeCAST will now exit.

Sponsored Links
  #2  
Old 02-17-2010
Registered User
 

Join Date: Feb 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Too complicated?

OK how about the best way to find the profile errors over a certain time-frame? For example if I ran the script every 15 minutes and count the times the profile alert happened.
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Logfile parsing with variable, multiple criterias among multiple lines reminder Shell Programming and Scripting 3 12-18-2009 03:18 AM
Logfile manipulation abilash.amara UNIX for Dummies Questions & Answers 2 11-21-2009 11:53 PM
Parsing of file for Report Generation (String parsing and splitting) umar.shaikh Shell Programming and Scripting 8 03-02-2009 12:38 AM
Perl parsing compared to Ksh parsing popeye Shell Programming and Scripting 1 08-06-2008 10:46 PM
logfile naveeng.81 Shell Programming and Scripting 1 04-07-2008 11:32 AM



All times are GMT -4. The time now is 07:48 AM.