If the file is being appended for every run and only the appended lines need to be processed. Suppose run1 is the file of the first run and run2 is the file of second run which has same content as run1 and some extra appended lines. The appended lines can be brought into a separate file and this file can be processed.
The command and ouput is :
This command gives the extra lines from run2. Hope this helps.
Hi,
Iam new to unix , plz help me to write below script.
I need to write a script for Monitoring log file when any error occurs it has to send a mail to specified users and it should be always pick latest error not the existing one and the script should be able to send mail all errors (more... (1 Reply)
Hi,
I need to get a script working to monitor a log file and throw an alert via mailx as soon as a particular error is encountered.
I do not want repeatative email notifications of same error so simply cat logfile and grepping the error would not work.
Here is what i planned but it seems... (2 Replies)
Hi all,
I need to develop the following script. Could anyone please provide me some inputs.
1) Monitor the system log file (sys.log) for any lines in the parameter file that will contain all the different phrases of FATAL errors that the process has to scan for in the sys.log.
If any FATAL... (7 Replies)
#!/bin/bash
tail /oracle/app/admin/ABC/bdump/alert_ABC.log >> tempoutput&
Error=`egrep 'error|warn|critical|fail|ORA-1683' tempoutput`
echo "$Error" |mailx -s "ABC Error " ABCD@domain.lk
cat /dev/null > tempoutput
I wrote this script and put in to cronjob every 5 min.
so every 5... (4 Replies)
how do i start with this guys?
Sample run:
$ LOGTIME it2015678 <enter>
User it2015678 is CRUZ Tommy H
And has logged on to the system for:
8 hours
12 minutes
from the time this script was run. (1 Reply)
I am a new member of this forum and am also new to unix shell scripting.
I joined the forum to seek for help to achieve my task as this forum helps people.
here's what i do manually on daily basis
1)Loginto different unix box
2)Ftp the log files (morethan 50 each dir) to windows
3)use text pad... (3 Replies)
Hi,
I ned to monitor the tomcat log file called "catalina.out" for "Out of memory" error.
the script should monitor this file and send us the mail as soon as it finds the string "Out of memory" in the file.
can ypu suggest me which is the best way to do this? (4 Replies)
Hi,
I'd like to know if there is a way to monitor a log file conitnuously for one or more strings and if found, send an alarm. It should also take care not to inlcude the old log file entries.
Thanks. (2 Replies)
Hi,
I am new to perl. I want to write a perl script to monitor logs. Where i want to monitor exceptions logged or any kind of error strings. I have a dir(On Solaris) with multiple log file which keeps rolling to .gz file after some time in that same dir. These logs files size keeps on... (0 Replies)
Hi there,
I have an application runnig on HP_UX which logs critical mesages to a log file.
What I would like to do is tail the log file and report on new messages. Easy....I here you say.
The log file is continuing to be written to and the check scritp will be executed from cron. I was... (2 Replies)