hugowan / maatkit

Automatically exported from code.google.com/p/maatkit
0 stars 0 forks source link

mk-log-parser stores log headers #136

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
mysql> select * from review LIMIT 1\G
*************************** 1. row ***************************
   checksum: 13720696405390305708
fingerprint: tcp port: N unix socket: /tmp/mysql.sock time id command argument 
     sample: Tcp port: 3306  Unix socket: /tmp/mysql.sock
Time                 Id Command    Argument

 first_seen: 2008-11-28 00:45:49

Original issue reported on code.google.com by ryan.a.l...@gmail.com on 28 Nov 2008 at 3:46

GoogleCodeExporter commented 9 years ago
Also, with input like this,

Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.0.67-percona-3-log (MySQL Percona Edition (GPL)).
started with:
Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time                 Id Command    Argument
# Time: 081126 19:20:00
# User@Host: cuscomro[cuscomro] @  [192.168.99.30]
# Thread_id: 21062  Schema: 
# Query_time: 3.843964  Lock_time: 0.000044  Rows_sent: 1045  Rows_examined: 
1045
select *
from foo.bar
where biz >= 21601;
/usr/sbin/mysqld, Version: 5.0.67-percona-3-log (MySQL Percona Edition (GPL)).
started with:
Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.0.67-percona-3-log (MySQL Percona Edition (GPL)).
started with:
Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.0.67-percona-3-log (MySQL Percona Edition (GPL)).
started with:
Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time                 Id Command    Argument
/usr/sbin/mysqld, Version: 5.0.67-percona-3-log (MySQL Percona Edition (GPL)).
started with:

The parsed output shows several queries mashed together as though they are a 
single
query.  The queries after the header lines are mashed in with the one buried in 
the
header lines.

I think it's time to write a special purpose parser for slow logs, and not have 
one
parser that tries to recognize all kinds of logs :)

Original comment by baron.schwartz on 30 Nov 2008 at 2:54

GoogleCodeExporter commented 9 years ago
I love being able to assign issues ;-)

Original comment by baron.schwartz on 30 Nov 2008 at 2:54

GoogleCodeExporter commented 9 years ago
This is fixed in r2602 with the new parser backend.

Original comment by baron.schwartz on 11 Dec 2008 at 9:34