I need a small help . I have written a script and its working fine . I faced a problem recemtly . In one of the folders archiving is taking time .
I will tell you what i am doing in my script
In a log , searching for a particular keywork
here this file will archive for every 12 hours . eventhough the issue is resolved , because of not archiving , the script is still failing .
So can someone please let me know , how to avoid this , if provided some example its more appreciable .
Thanks in advance .. Please let me know if i am not clear .
Actually , what we are searching here is . If anythng got hung , It will record there . Till it clears it will keep on in Hung state only . So eventhough the problem is resolved , we are still getting alerts ( this script is used by one of our monitoring tool) . , this is happening because , that hung (we can say "hung " word ) is still there in the log (because achive will happen for every 12 Hours ) . So i got an idea as , if we found the word hung , it has to record time frame for that , and the search has to start from the next time ( from the recorded time ) .
Hope you got me . If not ,i will try to explain even in detail ..
Below is my script to log all the command input by any user to /var/log/messages. But I cant achieve the desired output that i want. PLease see below.
function log2syslog
{
declare COMMAND
COMMAND=$(fc -ln -0)
logger -p local1.notice -t bash -i -- "$USER:$COMMAND"
}
trap... (12 Replies)
Hi ,
We have around 22 logs , each has different entries. I have to automate this using shell script. The ideas which am sharing is given below
1) We use only TAIL -100 <location and name of the log> Command to check the logs.
2) We want to check whether the log was updated before 24... (13 Replies)
How to check log size every 10min. by script (can use crontab)
if log size not change with alert "Log not update"
Base run on SunOS 5.8 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise
logFiles="log1.log log2.log"
logLocation="/usr/home/test/log/"
Out put.
Tue Jan 31... (3 Replies)
is there a way to efficiently monitor logfiles that do not have a date or time format? i have several logs on several different servers that need to be monitored. but i realized writing a script for this would be very complex and time consuming giving the variety of things i need to check for i.e.... (2 Replies)
AM in need of some plugin/script that can monitor HP-UX file "/var/opt/resmon/log/event.log" .
Have written a scrip in sh shell that is working fine for syslog.log and mail.log as having standard format, have interrogated that to Nagios and is working as I required .
But same script failed to... (3 Replies)
How can view log messages between two time frame from /var/log/message or any type of log files.
when logfiles are very big and especially many messages with in few minutes, I would like to display log messages between 5 minute interval.
Could you pls give me the command? (1 Reply)
I've been finding myself using a log file colorizer written in perl to reformat and colorize the output from many different programs. Mainly, however, I use it to make the output from "tail -f" commands more readable.
The base perl script I use is based on "colorlogs.pl" available from the... (1 Reply)
Hello All, On my SuSE system, I have wtmp log this log file permission is 644 but every reboot the file permission rollback to 664. In the logrotate.conf and logrotate.d/wtmp files the wtmp logrotate set to 644. I would like to know, which "file" or "script" modify the wtmp log to rollback to... (7 Replies)
Hi
What is the cvs command for getting the diff between the checkin log and tag log.
i am trying
cvs rdiff -s -r <branch Tag> -r <branch> <module>
but it is not giving me the files that were not tagged.
I think it is doing a diff for common files in head and tag.
Please help
... (0 Replies)