Command needed to Parse Catalina.out in Linux


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
# 1  
Data Command needed to Parse Catalina.out in Linux

Hi all,

Everyday I used to parse the Catalina.out log file on my Redhat system for errors for a particular date. Could anybody be able to help me to create a command which can grep the contents of Catalina.out starting from particular date.
Please do not suggest command which greps only the lines with that date, I mean I need all the lines starting from that particular date.

Thanks,
RedHatPerl
# 2  
show a sample of that file. and what you want to get.
# 3  
Here is the sample what I want.... see my Catalina.out logs below, here I want to grep all the lines which start from date May 25, 2009. upto the end but I need all the lines which comes in between, otherwise I could have used this :

grep "May 25" catalina.out

But it only gives me the lines with May 25, I need all the lines starting from date May 25 to the end of May 25.

[xxx@hub tomcat]$cat catalina.out
May 24, 2009 7:30:22 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/Java/1.5.0_12/jre/lib/i386/client:/opt/Java/1.5.0_12/jre/lib/i386:/opt/Java/1.5.0_12/jre/../lib/i386
May 24, 2009 7:30:22 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080
May 24, 2009 7:30:22 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 762 ms
May 24, 2009 7:30:23 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 24, 2009 7:30:23 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
May 24, 2009 7:30:24 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/opt/Tomcat/Tomcat_Base/webapps/xfire/WEB-INF/lib/javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
May 24, 2009 7:30:25 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080
May 24, 2009 7:30:25 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 25, 2009 1:30:25 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/27 config=null
May 25, 2009 1:30:25 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2301 ms
License file saxon-license.lic not found. Running in non-schema-aware mode
# 4  
so the output you want is
May 25, 2009 1:30:25 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/27 config=null
May 25, 2009 1:30:25 AM org.apache.catalina.startup.Catalina start

right? try to describe the output you want clearly.
# 5  
Yes you are right .. output I want is all the logs of date 25th May..
# 6  
Quote:
Originally Posted by redhatperl
Yes you are right .. output I want is all the logs of date 25th May..
then how about the last 2 lines ?

INFO: Server startup in 2301 ms
License file saxon-license.lic not found. Running in non-schema-aware mode

they are part of the last "May 25" right?
# 7  
Yes these all lines are part of "May 25"
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

10 More Discussions You Might Find Interesting

1. OS X (Apple)

MacOS 10.15 Catalina Crashes and Freezes on Boot

Sadly, I have turned off my access to the Apple Developers Beta program after installing macOS 10.15 Catalina a few days ago. After the install, I rebooted by MacBook Air and it "hard froze" and we were heading out of town so I grabbed a backup MBA running Mojave. Then, after getting back at... (8 Replies)
Discussion started by: Neo
8 Replies

2. Shell Programming and Scripting

Linux command needed

guys im new here and i need help with some linux commands. filea has keyword on each line identity aaa bbb ccc i have following commands. egrep 'www.identity' ~/home/m3 >~/home/lopo2 wc -l file ~/home/lopo2 say lopo2 has 44 lines then output saved is identity 44 (1 Reply)
Discussion started by: ahfze
1 Replies

3. Shell Programming and Scripting

Montioring Script Tomcat catalina.out

Hi, I need to monitor the tomcat log file called "Catalina.out" for any errors like out of memory,JDBC exceptions,broken pipe any other errors and exceptions The script should monitor this file and send a mail instantly and create a text file with errors day to day. Iam using Solaris... (3 Replies)
Discussion started by: chaithanyaa
3 Replies

4. UNIX for Advanced & Expert Users

Command help needed in linux flavour OS

HI, My requirement as below Log with Error Starting FeedRunner for feed: 200 Product example Items Error FeedRunner for feed: 200 Product example Items Stopping FeedRunner for feed : 200 Product example Items Feed time taken 231743 Log without Error Starting... (0 Replies)
Discussion started by: Paulwintech
0 Replies

5. Shell Programming and Scripting

Command needed in linux flavour OS

HI, My requirement as below Log with Error Code: Starting FeedRunner for feed: 200 Product example Items Error FeedRunner for feed: 200 Product example Items Stopping FeedRunner for feed : 200 Product example Items Feed time taken 231743 Log without Error Code: ... (0 Replies)
Discussion started by: Paulwintech
0 Replies

6. Shell Programming and Scripting

grep startup messages from catalina.out file

Hello Team, I am trying to extract date from the following output and trying to compare with current date and if there is 10 minute difference between the two. it should logs message in the file server is started.can anyone help me to implement this in the script? (1 Reply)
Discussion started by: coolguyamy
1 Replies

7. Solaris

Log Rotation of Catalina.out

Hi, Recently i received a request to rotate logs of catalina.out (tomcat). The file size was about 807 MB. I used logadm to truncate the log ( -c ) and zip (-z 0) it. Everything worked fine, catalina.out.0.gz was created (22 MB) and the size of original catalina.out became 0kb. After... (2 Replies)
Discussion started by: Mack1982
2 Replies

8. Shell Programming and Scripting

awk/sed Command : Parse parameter file / send the lines to the ksh export command

Sorry for the duplicate thread this one is similar to the one in https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121 Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies

9. Shell Programming and Scripting

Shell Script Needed to Parse Results

Raw Results: results|192.168.2|192.168.2.1|general/udp|10287|Security Note|For your information, here is the traceroute from 192.168.2.24 to 192.168.2.1 : \n192.168.2.24\n192.168.2.1\n\n results|192.168.2|192.168.2.1|ssh (22/tcp)|22964|Security Note|An SSH server is running on this port.\n... (2 Replies)
Discussion started by: jroberson
2 Replies

10. Solaris

Catalina Analysis

How can I make analysis for catalina.out (2 Replies)
Discussion started by: Burhan
2 Replies

Featured Tech Videos