Not the answer you need?
Register and ask your own question!

pt-query-digest - can't get it to show query listing for general log

davedave EntrantCurrent User Role Beginner
I'm using the latest (2.2.4) pt-query-digest to analyze my general query log, but it's only outputting some basic header info and not listing the normalized queries. I realize I won't get detailed timings on the general log like you do with the slow log. My goal is to get a list of normalized queries and execution counts from the general log to better understand some app behavior. Any ideas on why pt-query-digest isn't giving me a query listing?

Thanks in advance,
- Dave


I'm just just passing it the path to the general log:
pt-query-digest </path/to/general.log>

I'm getting this output:
# 190ms user time, 20ms system time, 24.30M rss, 150.87M vsz
# Current date: Mon Aug 26 13:31:42 2013
# Hostname: thehostname
# Files: /var/lib/mysql/xx/thehostname.log
# Overall: 0 total, 1 unique, 0 QPS, 0x concurrency ______________________
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Query size 92.69k 92.69k 92.69k 92.69k 92.69k 0 92.69k

and that's it. However, when I run it against the slow query log it lists out the normalized queries, but against the general log it always shows a query count of "1 unique" and no details listed in the query listing, even though the general log has ~ 100 instances of ~ 10 unique normalized queries. The logs are from Percona 5.5.32

Comments

  • davedave Entrant Current User Role Beginner
    Oops didn't read the docs closely enough. I was missing an argument. By default it parses slow log output. To parse general log you have to specify a log type like this:

    pt-query-digest --type genlog </path/to/general.log>
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.