Display lines between timestamp


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Display lines between timestamp
# 8  
Old 07-22-2016
hI

I ran search which should give clue for 21-july data which as below

Code:
 grep "ROOT_CAUSE" nodemanager.log


Code:
<Jul 21, 2016 3:40:46 PM BST> <INFO> <1265706386:28759:ERR:drop table ODIADMIN.C$_0DATA_UNDERLYING_ROOT_CAUSE purge >
<Jul 21, 2016 3:40:57 PM BST> <INFO> <1265706386:28759:ERR:drop table ODIADMIN.C$_0DATA_UNDERLYING_ROOT_CAUSE purge >
<Jul 21, 2016 3:40:58 PM BST> <INFO> <1265706386:28759:ERR:2016-07-21 15:40:58.591 ERROR ODI-1217 Session MAP_STG_DATA_UNDERLYING_ROOT_CAUSE_TIN (891071) fails with return code ODI-1298.>
<Jul 21, 2016 3:41:32 PM BST> <INFO> <1265706386:28759:ERR:2016-07-21 15:41:32.412 ERROR ODI-1134 Agent PDWOracleDIAgent_01 encountered an error: ODI-1217: Session MAP_STG_DATA_UNDERLYING_ROOT_CAUSE_TIN (891071) fails with return code ODI-1298. Caused by: ODI-1226: Step Physical_STEP fails after 1 attempt(s).>

You can see the 21-july data but i am still not getting data between 3:30 to 3:41.

above data shows the even occured at that time but i can't see the full text which spans 5 to 6 min
# 9  
Old 07-22-2016
Ok, what happens if you issue:

Code:
sed -n '/Jul 21, 2016 3:40:46 PM BST/,/Jul 21, 2016 3:41:32 PM BST/p' nodemanager.log

?
# 10  
Old 07-22-2016
What be the result of

Code:
grep "Jul 21, 2016 3" nodemanager.log

and/or
Code:
grep "Jul 21, 2016 3:3" nodemanager.log

# 11  
Old 07-22-2016
Hi

This is working and sufficient for me

Many thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep lines between last hour timestamp and current timestamp

So basically I have a log file and each line in this log file starts with a timestamp: MON DD HH:MM:SS SEP 15 07:30:01 I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies

2. Shell Programming and Scripting

To check timestamp in logfile and display lines upto 3 hours before current timestamp

Hi Friends, I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies

3. UNIX for Dummies Questions & Answers

Display files based on particular file timestamp

Hi, I have requirement to list out files that are created after particular file. ex. I have below files in my directory. I want to display files created after /dirdat/CG1/cg004440 file. ./dirdat/CG1/cg004438 09/07/14 0:44:05 ./dirdat/CG1/cg004439 09/07/14 6:01:48 ... (3 Replies)
Discussion started by: tmalik79
3 Replies

4. Shell Programming and Scripting

Display .bash_history with timestamp using script

Hi would like to ask if there is anyway to display .bash_history with timestamp using shell script? i know that you should use history command with HISTTIMEFORMAT="%d/%m/%y %T " to display it in terminal but it does not work when i use it on shell script. It seem that you can't run history... (1 Reply)
Discussion started by: pikamon
1 Replies

5. UNIX for Advanced & Expert Users

ls -l timestamp display format

The time stamp format using "ls -l" is either mmm dd hh:mm or mmm dd yyyy. For later case, how can I know the hh:mm as well. Thanks. (3 Replies)
Discussion started by: pok.fung
3 Replies

6. Shell Programming and Scripting

concatenate log file lines up to timestamp

Hi, Using sed awk or perl I am trying to do something similar to https://www.unix.com/shell-programming-scripting/105887-sed-awk-concatenate-lines-until-blank-line-2.html but my requirement is slightly different. What I am trying to accomplish is to reformat a logfile such that all lines... (4 Replies)
Discussion started by: AlanC
4 Replies

7. Shell Programming and Scripting

copy lines from log files based on timestamp and sysdate

I am sorry to repost this question. it was not clear, and I had the meeting and didn't response the question on time. I do really need help and appreciate your help very much. I'm looking for a simple shell script that will read lots of audit log file (*.aud) in a log fold every 10 minutes,... (1 Reply)
Discussion started by: percvs88
1 Replies

8. Shell Programming and Scripting

Find files older then today & display with timestamp info

Small query- I want to do some operation on all the files older then today. Before I do that operation, i want to verify if the command works properly or not. Surprisingly, the command below returns me file, which are created today - find /mrk_archive/PG/ftp/incomming/gbs/2008 -type f... (2 Replies)
Discussion started by: kedar.mehta
2 Replies

9. UNIX for Advanced & Expert Users

Copy lines from a log file based on timestamp

how to copy lines from a log file based on timestamp. INFO (RbrProcessFlifoEventSessionEJB.java:processFlight:274) - E_20080521_110754_967: rbrAciInfoObjects listing complete! INFO (RbrPnrProcessEventSessionEJB.java:processFlight:197) - Event Seq: 1647575217; Carrier: UA; Flt#: 0106; Origin:... (1 Reply)
Discussion started by: ranjiadmin
1 Replies

10. UNIX for Dummies Questions & Answers

display the timestamp of a server UNIX

I can't find the command shell UNIX to display the timestamp of the current date. It's not an option of the commande date. (3 Replies)
Discussion started by: nicolas
3 Replies
Login or Register to Ask a Question