12-16-2010
Hello Anurag,
Thanks a lot for your response. My system logs will contain out of memory message in below format.
Quote:
bash-3.00$ grep -i outofmemory SystemOut.log_bak14122010
[12/14/10 14:43:03:732 CET] 00000041 servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet springDispatcherServlet in application ccrtool. Exception created : org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.OutOfMemoryError: Java heap space
Caused by: java.lang.OutOfMemoryError: Java heap space
[12/14/10 14:46:15:086 CET] 00000041 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[springDispatcherServlet]: java.lang.OutOfMemoryError: Java heap space
My requirement is script should search entire file for the outofmemory error message and if the error is latest then it should send the alert mail. Please let me know if you have further query.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to write a script which would go search and get the info from the logs based on yesterday timestamp and write yesterday logs in new file. The log file format is as follows:
""""""""""""""""""""""""""... (3 Replies)
Discussion started by: harish.parker
3 Replies
2. UNIX for Dummies Questions & Answers
I tried this script to get a count of the occurrence of a string in files.
I have multiple files in one directory I will use this on.
All the filenames begin "invALL.06" The script works, except it counts twice for every one instance of 'Invoice Total'.
If there are 5 occurences of 'Invoice... (2 Replies)
Discussion started by: scarletsupra
2 Replies
3. Shell Programming and Scripting
Hi,
I am trying to grep a particular string from the files of 2 different servers without copying and calculate the total count of its occurence on both files.
File structure is same on both servers and for reference as follows:
27-Aug-2010... (4 Replies)
Discussion started by: poweroflinux
4 Replies
4. Shell Programming and Scripting
I have prepare script to grep for outofmemory messages in the logs. I need help in modifying script. I have implemented small logic. The outofmemory messages form six logs will store in variables.
var1=`grep -i outofmemory $tomcat1logs | sed -n '$p'| sed -n -e "s/.*\(outofmemory\).*/\1/p"`... (6 Replies)
Discussion started by: coolguyamy
6 Replies
5. Shell Programming and Scripting
Hello Team,
I need help to improve my script which is used to grep 500 error messages in the logs.
I am using following logic in the script to grep 500 error messages in the logs.
var1=`awk '$9 == "500"' access_log | tail -1`
The above logic is not useful if logs are not getting... (1 Reply)
Discussion started by: coolguyamy
1 Replies
6. Shell Programming and Scripting
Hi All
I am writing a script which will select the latest logs (which are generated every night via a script) among old one and new. Script generates set of 3 logs each time it runs. Example :
log-WedJun082011_bkt1.log
log-WedJun082011_bkt2.log
log-WedJun082011_bkt3.log
I have... (1 Reply)
Discussion started by: ratneshnagori
1 Replies
7. Shell Programming and Scripting
Hi Guys,
I want to write a script which can grep the logs (server.log) from a file for Error String and output to a other file.
Problems:
How to know about the errors only between the current restart and not in previous as server.log has earlier restarts also?
thanks for the help! Much... (5 Replies)
Discussion started by: ankur328
5 Replies
8. Shell Programming and Scripting
I'm in need of some kind of script that will search for a string in each logfile in a directory but we don't want to use GREP. GREP seems to use up to much of our memory causing the server to use up a lot of swap space. Our log files are bigger than 500M on a daily basis. We lately started... (8 Replies)
Discussion started by: senormarquez
8 Replies
9. UNIX for Beginners Questions & Answers
MyLOG:
2017/11/12 17:01:54.600 : Error: LPID: 3104680848 WRONG CRITERIA FOUND. tRealBuilder::Generate
Output Required:
If Ke word "WRONG CRITERIA FOUND" in latest log ( logs are regularly generating - real time) mail to us
once mailed wait for 2 hours for second mail.
mail subject... (3 Replies)
Discussion started by: vivekn
3 Replies
10. Shell Programming and Scripting
Appreciate help for the below issue.
Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt..............
1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies