3
votes
2answers
516 views

Split log file by time range

I have a log file and would like to cut it into copies of 15min. In the log file the lines start with: dd mmm yyyy hh:mm:ss,xxx e.g. 12 Feb 2013 16:05:02,xxx log text... and the file rotates ...
1
vote
4answers
248 views

How to process these DHCP logs to be human readable?

I have this input: Sep 23 13:43 192.168.6.200 Sep 23 13:44 192.168.6.166 Sep 23 13:45 192.168.6.200 Sep 23 13:46 192.168.6.166 Sep 23 13:47 192.168.6.200 Sep 23 13:48 192.168.6.166 Sep 23 13:49 ...
4
votes
2answers
756 views

Moving average on a log file with awk or other unix utilities?

Scenario: I have a log file that has a few number of entry "classes", like this: R0 dx=0.00500 rb=0.00000 sn=1 3145.88 2.59 0.08 se=21315 id=16190 R0 dx=0.00300 rb=-1.00000 sn=1 3150.40 2.38 0.05 ...
3
votes
2answers
2k views

How would I extract the user agent strings from a log file?

Currently I am running a command like this, to get the most requested content: grep "17\/Jul\/2011" other_vhosts_access.log | awk '{print $8}' | sort | uniq -c | sort -nr I want to now see the user ...
3
votes
2answers
626 views

Using grep/sed/awk to classify log file entries

I need to process a very large log file with many lines in different formats. My goal is to extract unique line entries who have the same starting pattern, e.g. '^2011-02-21.*MyKeyword.*Error', ...