Sponsored Content
Full Discussion: Logs between two time stamp
Top Forums Shell Programming and Scripting Logs between two time stamp Post 302959829 by zenkarthi on Friday 6th of November 2015 10:13:00 AM
Old 11-06-2015
Logs between two time stamp

I am creating log monitoring script and stuck up to get the logs between two time stamp.

can you please help me to create the script to get the logs between two time stamp, for example, I need the complete logs between
Code:
 # Time: 150328  1:30:10 and # Time: 150328 19:10:57

OS : Cent OS 6.x
Date format in the log :
Code:
 `date "+%y%m%d  %H:%M:%S"`

Sample logs:
Code:
# Time: 150328  1:30:10
# User@Host: testuser[testuser] @ test.domain.com [192.168.1.1]
# Query_time: 20.00009 Lock_time: 0.000063 Rows_sent: 9  Raw_del: 1
SET timestamp=1234567890;
xyz-set order number =  xxxx. phone number = null, phone number = test, email_ address=null street address place=null direction=gps test=query email address=invalidate
code=testzero first email from test user zip = 0000 house number = 0000 zip_house location level_of_service error invalid test_test123 floor=null room=null status_code
buillding_address floor-bull where id 000 test 123:
# Time: 150328 11:15:15
# User@Host: testuser[testuser] @ test.domain.com [192.168.1.1]
# Query_time: 20.00009 Lock_time: 0.000063 Rows_sent: 9  Raw_del: 1
SET timestamp=1234567890;
xyz-set order number =  xxxx. phone number = null, phone number = test, email_ address=null street address place=null direction=gps test=query email address=invalidate
code=testzero first email from test user zip = 0000 house number = 0000 zip_house location level_of_service error invalid test_test123 floor=null room=null status_code
buillding_address floor-bull where id 000 test 123:
# Time: 150328 19:10:57

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to MV without changing Time Stamp

Hi, I need to move the set of files, and it should be same time stamp as previous. How to do this? (3 Replies)
Discussion started by: redlotus72
3 Replies

2. Shell Programming and Scripting

greping with time stamp

Hi all, I want to grep a file name with time stamp as 30 minutes how can i??. Ex I will getting outputs in a file every minutes I want to grep it by a time intervals of 30 and show it . Any help will be great ! Thanks, Arun. (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

3. UNIX for Dummies Questions & Answers

Date/Time Stamp

Hi All, Wondering if there is have a date added at the end of a test string. I have a hypothetical text file day one: John Paul George When the file day one is output, I'd like it to read something like this: John 101406 Paul 101406 George 101406 Day two, when the same text file... (0 Replies)
Discussion started by: JimmyFlip
0 Replies

4. UNIX for Dummies Questions & Answers

How to get the next time stamp in perl?

Hi, I have to find the next time stamp in perl. Here is the code. @time = loaltime(time); print "\n Present time: $time:$time:$time \n"; For example if the time is: "12:55:02" after some process the time becomes 1:00:00. How do i check when it becomes 00:00 i.e from "12:55:02... (0 Replies)
Discussion started by: vanitham
0 Replies

5. Shell Programming and Scripting

regarding time stamp

hi everyone i am facing a strange problem here suppose content of my file is a=1,2,3 b=2,3,4 c=4,5,6 time= now the problem is i want to add value in front of time variable and the value should be i format only "HHMMSS" so it should be like this a=1,2,3 b=2,3,4 c=4,5,6... (3 Replies)
Discussion started by: aishsimplesweet
3 Replies

6. Shell Programming and Scripting

How to get time duration between two human readable time stamp in Unix?

Here is two time I have: Jul 12 16:02:01 Jul 13 01:02:01 and how can I do a simple match to get difference between two time which is 09:00:00 Thanks in advance. (3 Replies)
Discussion started by: ford99
3 Replies

7. Solaris

System time and Cron time stamp not matching

On Solaris 10 server the system date won't match with the timestamp on files created by a cron jobs, Please help here is what i get when i check for system date infodba-ie10ux014:/tcpdv1_ie10/tcadmin/bin\n\r-> date Tue Apr 24 15:27:43 GMT 2012at same time i executed a cron job, and checked... (4 Replies)
Discussion started by: karghum
4 Replies

8. Shell Programming and Scripting

Time stamp Difference

I have a log file which wrote time stamp like this 2013-02-11 00:46:40.389037 2013-02-12 11:46:40.197045 can any one help me to get the time stamp difference of these two line in seconds. (4 Replies)
Discussion started by: netdbaind
4 Replies

9. Shell Programming and Scripting

How to collect the logs with in two time stamp ?

Hi Gurus I need to collect the logs between two time stamp... The log files 12 hours format (ex- Nov 14, 2013 12:10:16 AM UTC) I tried the below commands but no luck. awk '$0 >= "Nov 14, 2013 9:40:01" && $0 <= "Nov 14, 2013 9:55:01"' file sed -n '/Nov 14, 2013 7:58:00 PM UTC/,/Nov 14, 2013... (5 Replies)
Discussion started by: zenkarthi
5 Replies

10. Shell Programming and Scripting

Difference between time stamp

Hi All i have a file data like below format A, B 2016-04-14 16:30:00,2016-04-14 16:31:17 2016-04-14 16:40:00,2016-04-14 16:41:10 2016-04-14 16:50:00,2016-04-14 16:50:41 2016-04-14 17:00:00,2016-04-14 17:00:35 2016-04-14 17:10:00,2016-04-14 17:11:48 2016-04-14 17:20:00,2016-04-14 17:20:37 i... (2 Replies)
Discussion started by: Tarak_nath
2 Replies
EXIM_CHECKACCESS(8)                                           System Manager's Manual                                          EXIM_CHECKACCESS(8)

NAME
exim_checkaccess - Check address acceptance from given IP SYNOPSIS
exim_checkaccess IP-address email@address [more Exim options] DESCRIPTION
Exim's -bh command line argument allows you to run a fake SMTP session with debugging output, in order to check what Exim is doing when it is applying policy controls to incoming SMTP mail. However, not everybody is sufficiently familiar with the SMTP protocol to be able to make full use of -bh, and sometimes you just want to answer the question "Does this address have access?" without bothering with any fur- ther details. The exim_checkaccess utility is a 'packaged' version of -bh. It takes two arguments, an IP address and an email address: exim_checkaccess 10.9.8.7 A.User@a.domain.example The utility runs a call to Exim with the -bh option, to test whether the given email address would be accepted in a RCPT command in a TCP/IP connection from the host with the given IP address. The output of the utility is either the word 'accepted', or the SMTP error response, for example: Rejected: 550 Relay not permitted When running this test, the utility uses "<>" as the envelope sender address for the MAIL command, but you can change this by providing additional options. These are passed directly to the Exim command. For example, to specify that the test is to be run with the sender address "himself@there.example" you can use: exim_checkaccess 10.9.8.7 A.User@a.domain.example -f himself@there.example Note that these additional Exim command line items must be given after the two mandatory arguments. BUGS
This manual page needs a major re-work. If somebody knows better groff than us and has more experience in writing manual pages, any patches would be greatly appreciated. SEE ALSO
exim(8), /usr/share/doc/exim4-base/ AUTHOR
This manual page was stitched together from spec.txt by Andreas Metzler <ametzler at downhill.at.eu.org>, for the Debian GNU/Linux system (but may be used by others). March 26, 2003 EXIM_CHECKACCESS(8)
All times are GMT -4. The time now is 06:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy