How to capture the logs in last 4 hours from the consoldated log files
Hi All,
Could you please help me to write bash script to grep the logs captured in last 4 hours from the consolidated log file (Log file will be manually truncated for every 2 months).
Below is sample log:
By using the above command i am getting all the log details from March 24 but i am expecting to get the last 4 hours logs only.
Please helpful me and thanks in advance...
Last edited by Franklin52; 05-17-2012 at 02:07 PM..
Reason: Code tags
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)
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,
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 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 All;
I have a log file(dynamic) which i need to monitor; the format of the log
file is as follows
#Session ID STATUS
The status can be one of the three /starting ;/loading ;/success
Example
#Session ID STATUS
ABC /started.html
XYZ /started.html
ABC /loading.html
ABC... (2 Replies)
Hi,
I require need help in two aspects actually:
1) Fatal error that gets generated as %F% from a log file say ABClog.dat to trigger a mail. At present I manually grep the log file as <grep %F% ABClog.dat| cut-d "%" -f1>. The idea is to use this same logic to grep the log file which is... (1 Reply)
Hi,
I ned to monitor the tomcat log file called "catalina.out" for "OutOfMemory" ,"java.sql.SQLException" and "Error" error.
the script should monitor this file (catalina.out) and send us the mail as soon as it finds the string "Out of memory" or "java.sql.SQLException" or "Error" in the... (2 Replies)
Below is Script to scan the errorlist file (errorlist file includes a list of errors) with sererv.log file (sererv.log file should contain data of recent 15mins )
but my requirement is I should get the recent logs i.e. cmd to capture only recent 15mins data logged from sererv.log file then scan... (3 Replies)
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)
Today, I noticed some errors in our SSL cert renewal log files, mostly related to domains where the IP address had changed. Concerned about this, rebuilt out SSL cert, which normally goes well without a hiccup.
However, for today, for some reason which I cannot explain, there was a PHP error... (0 Replies)
Discussion started by: Neo
0 Replies
LEARN ABOUT OSX
svk::command::log
SVK::Command::Log(3) User Contributed Perl Documentation SVK::Command::Log(3)NAME
SVK::Command::Log - Show log messages for revisions
SYNOPSIS
log DEPOTPATH
log PATH
log -r N[:M] [DEPOT]PATH
OPTIONS -r [--revision] ARG : ARG (some commands also take ARG1:ARG2 range)
A revision argument can be one of:
"HEAD" latest in repository
{DATE} revision at start of the date
NUMBER revision number
NUMBER@ interpret as remote revision number
NUM1:NUM2 revision range
Unlike other commands, negative NUMBER has no
meaning.
-l [--limit] REV : stop after displaying REV revisions
-q [--quiet] : Don't display the actual log message itself
-x [--cross] : track revisions copied from elsewhere
-v [--verbose] : print extra information
--xml : display the log messages in XML format
--filter FILTER : select revisions based on FILTER
--output FILTER : display logs using the given FILTER
DESCRIPTION
Display the log messages and other meta-data associated with revisions.
SVK provides a flexible system allowing log messages and other revision properties to be displayed and processed in many ways. This
flexibility comes through the use of "log filters." Log filters are of two types: selection and output. Selection filters determine which
revisions are included in the output, while output filters determine how the information about those revisions is displayed. Here's a
simple example. These two invocations produce equivalent output:
svk log -l 5 //local/project
svk log --filter "head 5" --output std //local/project
The "head" filter chooses only the first revisions that it encounters, in this case, the first 5 revisions. The "std" filter displays the
revisions using SVK's default output format.
Selection filters can be connected together into pipelines. For example, to see the first 3 revisions with log messages containing the
string 'needle', we might do this
svk log --filter "grep needle | head 3" //local/project
That example introduced the "grep" filter. The argument for the grep filter is a valid Perl pattern (with any '|' characters as '|' and
'' as '\'). A revision is allowed to continue to the next stage of the pipeline if the revision's log message matches the pattern. If
we wanted to search only the first 10 revisions for 'needle' we could use either of the following commands
svk log --filter "head 10 | grep needle" //local/project
svk log -l 10 --filter "grep needle" //local/project
You may change SVK's default output filter by setting the SVKLOGOUTPUT environment. See svk help environment for details.
Standard Filters
The following log filters are included with the standard SVK distribution:
Selection : grep, head, author
Output : std, xml
For detailed documentation about any of these filters, try "perldoc SVK::Log::Filter::Name" where "Name" is "Grep", "Head", "XML", etc..
Other log filters are available from CPAN <http://search.cpan.org> by searching for "SVK::Log::Filter". For details on writing log
filters, see the documentation for the SVK::Log::Filter module.
perl v5.10.0 2008-08-04 SVK::Command::Log(3)