12-06-2010
Hello Jim,
I have six tomcat log files. The script should grep latest outofmemory message from the log files and send the mail alert with description "suppose if outofmmemory in tomcat1 server then it should send message 'there is outofmemory in tomcat1 server" and same for tomcat2,tomcat3,tomcat4,tomcat5 and tomcat6. kindly guide.
Path for tomcat log files.
tomcat1logs=/opt/local/tomcat1/logs/catalina.out
tomcat2ogs=/opt/local/tomcat2/logs/catalina.out
tomcat3logs=/opt/local/tomcat3/logs/catalina.out
tomcat4logs=/opt/local/tomcat4/logs/catalina.out
tomcat5logs=/opt/local/tomcat5/logs/catalina.out
tomcat6logs=/opt/local/tomcat6/logs/catalina.out
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm about 5 months new on an 5 year old unix system. If anyone can help me identify what causing the below errors i'd really appreciate it!
unix: WARNING: /pci@1f,0/pci@1,1/ide@3/dad@1,0 (dad1):
Uncorrectable data Error: Block 57e10
Unix: WARNING: /pci@1f,0/pci@1,1/ide@3/dad@1,0 (dad1):... (1 Reply)
Discussion started by: ByasB
1 Replies
2. UNIX for Advanced & Expert Users
I am getting this message in the log file.
Apr 29 15:32:02 router ppp: Warning: Label COPYRIGHT rejected -direct connection: Configuration label not found
This repeats every so often, the link is up however...Any ideas why i am getting this. Its freebsd 6.1 and pppoE.
Frank (1 Reply)
Discussion started by: frankkahle
1 Replies
3. Shell Programming and Scripting
Hi,
We use an application that is dumping logs to a file on disk. However, this is dumping very verbosely and there is no method of turning down the logging level. We need to remove certain contents from these before they are commited to disk.
Has anybody got any ideas how I can do this... (3 Replies)
Discussion started by: harperonline
3 Replies
4. 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
5. Shell Programming and Scripting
(I'm aware log rotation is a common subject, but I tried searching and couldn't find an answer)
For some time now, I've been using the Logfile::Rotate module to rotate logs in a log-monitoring script. So far, I haven't experienced any problems, and it works great because I can use it in Linux... (1 Reply)
Discussion started by: w1r3d
1 Replies
6. Shell Programming and Scripting
I have requirement to prepare script which will grep for latest outofmemory message from the logs. I have used following command to grep the string from the logs,this script is not effective when logs are not getting updated as it will grep for old message.
f=catalina.out
var=`tail -10 $f |... (17 Replies)
Discussion started by: coolguyamy
17 Replies
7. 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
8. Shell Programming and Scripting
Hi all,
. I am developing a log monitoring solution in perl for Windows I am using the CPAN module Win32 ::EventLog (0.076) version for getting the events from windows. The problem which I am facing now is all the Windows 2008 machines are upgraded with Service pack2 from then I couldn’t able... (2 Replies)
Discussion started by: kar_333
2 Replies
9. 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
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
LEARN ABOUT XFREE86
getbuildlog
GETBUILDLOG(1) General Commands Manual GETBUILDLOG(1)
NAME
getbuildlog - download build logs from Debian auto-builders
SYNOPSIS
getbuildlog package [version-pattern] [architecture-pattern]
DESCRIPTION
getbuildlog downloads build logs of package from Debian auto-builders. It downloads build logs of all versions and for all architectures if
version-pattern and architecture-pattern are not specified or empty, otherwise only build logs whose versions match version-pattern and
build logs whose architectures match architecture-pattern will be downloaded. The version and architecture patterns are interpreted as
extended regular expressions as described in grep(1).
If version-pattern is "last" then only the logs for the most recent version of package found on buildd.debian.org will be downloaded.
If version-pattern is "last-all" then the logs for the most recent version found on each build log index will be downloaded.
OPTIONS
-h, --help
Show usage information and examples.
-V, --version
Show version and copyright information.
EXAMPLES
getbuildlog hello 2.2-1 amd64
Download amd64 build log for hello version 2.2-1.
getbuildlog glibc "" mips.*
Download mips(el) build logs of all glibc versions.
getbuildlog wesnoth .*bpo.*
Download all build logs of backported wesnoth versions.
AUTHOR
Written by Frank S. Thomas <fst@debian.org>.
DEBIAN
Debian Utilities GETBUILDLOG(1)