The challenge here is there are three date and time format.
First :- 07/Mar/2004:16:05:49
Second :- Sun Mar 7 16:02:00 2004
Third :- 29-Mar 15:18:20.54
I have sed command which can help to get this but we should force user to mention format . I want this to be general . How can i achieve this. I will like to parse log file and create a new file to keep time format same and then using sed or grep it's pretty simple.
Please let me know a good way to achieve this. Any pointers will also help
Hi,
I'm trying to accomplish the following and would like some suggestions or possible bash script examples that may work
I have a directory that has a list of log files that's periodically dumped from a script that is crontab that are rotated 4 generations. There will be a time stamp that is... (4 Replies)
Hi,
Is it possible to set the two time formats in a single machine. My machine time is in EST and the logs are in PST. What would be the issue, and how to make change of this.? (5 Replies)
Hi there, am trying to parse an Apache 'server' config file. A snippet of the config file is shown below:
.....
ProxyPassReverse /foo http://foo.example.com/bar
.....
.....
RewriteRule ^/(.*) http://www.example.com/$1
RewriteRule /redirect https://www.example1.com/$1
........ (7 Replies)
Hello,
I have a log file for the year, which contains lines starting with the data in the format of YYYY-MM-DD. I need to get all the lines that contain the DD being 04, how would I do this? I tried using grep "*-*04" but it didn't work.
Any quick one liners I should know about?
Thank you. (2 Replies)
I was looking at this script which outputs the two lines which differs less than one sec.
#!/usr/bin/perl -w
use strict;
use warnings;
use Time::Local;
use constant SEC_MILIC => 1000;
my $file='infile';
## Open for reading argument file.
open my $fh, "<", $file or die "Cannot... (1 Reply)
Greetings
I have a file formatted like this:
rhino grey weight=1003;height=231;class=heaviest;histology=9,0,0,8
bird white weight=23;height=88;class=light;histology=7,5,1,0,0
turtle green weight=40;height=9;class=light;histology=6,0,2,0... (2 Replies)
Hello All,
Below is the excerpt from my Informatica log file which has 4 blocks of lines (starting with WRITER_1_*_1). Like these my log file will have multiple blocks of same pattern.
WRITER_1_*_1> WRT_8161
TARGET BASED COMMIT POINT Thu May 08 09:33:21 2014... (13 Replies)
I am developing one script which will take log file name, output file name, date, hour and minute as an argument and based on these inputs, the script will scan and capture all the error(s) that have been triggered from a given time. Example: script should capture all the error after 13:50 on Jan... (2 Replies)
I am trying to do a comparison of files based on their last modified date.
I am pulling the first file from a webapp folder using curl.
curl --silent -I http://localhost:8023/conf/log4j2.xml | grep Last
Last-Modified: Tue, 22 Mar 2016 22:02:18 GMT
The second file is on local disk.
stat... (2 Replies)
The below perl script parses a variety of formats. If I use the numeric text file as input the script works correctly. However using the alpha text file as input there is a black output file. The portion in bold splits the field to parse f or NC_000023.10:g.153297761C>A into a variable $common but... (3 Replies)
Discussion started by: cmccabe
3 Replies
LEARN ABOUT CENTOS
qb-blackbox
QB-BLACKBOX(8) System Manager's Manual QB-BLACKBOX(8)NAME
qb-blackbox - Display "flight data" from the "blackbox".
SYNOPSIS
qb-blackbox <blackbox files>...
DESCRIPTION
qb-blackbox Print out the logs (including debug logs) that were recorded using libqb's blackbox.
EXAMPLES
Get info to help developers diagnose a crash.
$ qb-blackbox /var/lib/corosync/fdata
Dumping the contents of /var/lib/corosync/fdata
Mar 23 20:58:57 message_handler_orf_token():3677 install seq 0 aru 0 high seq received 0
Mar 23 20:58:57 message_handler_orf_token():3696 retrans flag count 4 token aru 0 install seq 0 aru 0 0
Mar 23 20:58:57 old_ring_state_reset():1487 Resetting old ring state
Mar 23 20:58:57 deliver_messages_from_recovery_to_regular():1693 recovery to regular 1-0
Mar 23 20:58:57 memb_state_operational_enter():1779 Delivering to app 1 to 0
Mar 23 20:58:57 sync_abort():594 ENTERING sync_abort()
Mar 23 20:58:57 sync_save_transitional():586 ENTERING sync_save_transitional()
Mar 23 20:58:57 member_object_joined():301 Member joined: r(0) ip(192.168.122.1)
Mar 23 20:58:57 sync_abort():594 ENTERING sync_abort()
SEE ALSO qblog.h(3),
AUTHOR
Angus Salkeld
2012-05-28 QB-BLACKBOX(8)