Sponsored Content
Full Discussion: Grep last 5 mins from logs
Top Forums UNIX for Beginners Questions & Answers Grep last 5 mins from logs Post 303036077 by scazed on Thursday 13th of June 2019 03:28:32 PM
Old 06-13-2019
Im using Ubuntu

--- Post updated at 07:28 PM ---

something simple would be appreciated
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep logs on the fly

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

2. Shell Programming and Scripting

Grep yesterday logs from weblogic logs

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

3. Shell Programming and Scripting

Grep for lines in web logs

I want to find the unique url in a apache logs which got 404 error . I can do something like "cat apache.log|grep 404|awk '{print $2,$3}'|grep 404 this will give me say /foo.html 404 /foo.html 404 /foo.html 404 /bar.html 404 /cat.html 404 However my output should only find... (3 Replies)
Discussion started by: gubbu
3 Replies

4. Shell Programming and Scripting

how to grep the logs for two particular timestamp

Hi, could anyone help me out how to write a script, to grep the two timestamp from a particular file, so that it will list out all the logs between the particular timestamp I have a pattern of log: servicename operationname starttime endtime eg., servicename1 operationname1 01:11:11... (1 Reply)
Discussion started by: jacktolearn
1 Replies

5. Shell Programming and Scripting

script to grep outofmemory message in logs

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

6. Shell Programming and Scripting

Retrieve logs generated in last 10 mins from a log file using 'grep' command

HI All, I have a log file where the logs will be in the format as given below: 2011-05-25 02:32:51 INFO PROCESS STARTING 2011-05-25 02:32:52 INFO PROCESS STARTED . . . I want to retrieve only the logs which are less than 5 mins older than current time using grep... (3 Replies)
Discussion started by: rvhg16
3 Replies

7. AIX

Grep last 5 mins from log file in AIX

I want to grep only last 5 mins of a log file in bash I have a syslog which contains the following Mon Jul 11 20:47:42 Mon Jul 11 20:47:52 The following works in Unix but not in AIX . Please can you let me know as to what would be the AIX equivalent Code: for (( i = 5; i >=0;... (1 Reply)
Discussion started by: necro98
1 Replies

8. UNIX for Dummies Questions & Answers

Grep Logs That Are Updating

Hello all. I am new to this forum and also very new to using grep - so please excuse me if this question is not in the correct forum and/or is not pertinent to this website. I use greps like this: gunzip -c L:\System1\SailLogger_20071019* L:\System2\SailLogger_20071019*... (14 Replies)
Discussion started by: Carl2013
14 Replies

9. Shell Programming and Scripting

Script to grep logs for Errors

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

Need logs 5 mins old

I need 5 mins old logs to be dumped into a a new file. The date formats in the two log files are Can you suggect for both formats ? bash-3.2$ uname -a SunOS myserver 5.10 Generic_150400-26 sun4v sparc sun4v ---------- Post updated 05-04-16 at 12:24 AM ---------- Previous update was... (2 Replies)
Discussion started by: mohtashims
2 Replies
COMMON2DLF.IN(1)					  LogReport's Lire Documentation					  COMMON2DLF.IN(1)

NAME
common2dlf - convert Common Log Format web server log files to www DLF SYNOPSIS
common2dlf file DESCRIPTION
common2dlf converts Common Log Format web server log files to the www DLF. Common Log Format is a standard log format that was originally implemented in the CERN httpd web server but that now supported nowadays by most web servers. Apache, IIS, Boa and PureFTPD can be configured to log in that format. If the file argument is missing, STDIN will get parsed. DLF will be printed on STDOUT. COMMON LOG FORMAT
The Common Log Format has the following format: remotehost rfc931 authuser [date] "request" status bytes where the fields have the following meaning: remotehost The host that made the request. Can be an IP or a hostname. rfc931 The result of an ident lookup on the host. This is usually never used. authuser The authenticated username. date The timestamp of the request. request The first line of the request. Usually in the format "method request-uri http-version". See also RFC 2616, section 5.1. status The result status of the request. i.e. 200, 301, 404, 500. bytes The size of the request sent to the client. Log example: 127.0.01 - - [11/03/2001 12:12:01 -0400] "GET / HTTP/1.0" 200 513 dsl1.myprovider.com - francis [11/03/2001 12:14:01 -0400] "GET /secret/ HTTP/1.0" 200 1256 EXAMPLES
To process a log as produced in the common logformat: $ lr_run common2dlf < common.log common2dlf will be rarely used on its own, but is more likely called by lr_log2report: $ lr_log2report common < /var/log/httpd/common.log SEE ALSO
combined(2), modgzip2dlf(1), referer2dlf(1) AUTHORS
Joost van Baal <joostvb@logreport.org>, Francis J. Lacoste <flacoste@logreport.org> and Egon Willighagen <egonw@logreport.org>, based on an idea by Edwin Groothuis VERSION
$Id: common2dlf.in,v 1.15 2006/07/23 13:16:36 vanbaal Exp $ COPYRIGHT
Copyright (C) 2000, 2001 Stichting LogReport Foundation LogReport@LogReport.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. Lire 2.1.1 2006-07-23 COMMON2DLF.IN(1)
All times are GMT -4. The time now is 09:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy