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

pt-query-digest daemonized slow log reader

Trey RaymondTrey Raymond EntrantInactive User Role Beginner
I have a need for something that could run on thousands of servers, watch the slow logs, abstract the queries and collect data, and then insert that info into a central database. I see that pt-q-d has a daemonize function, but it appears to be intended to watch processlist or tcp and log progressively to a file. I want something that can be kicked off, will start at launch time in the slow logs, and collect data until it is killed. I tried variations on:

pt-query-digest --daemonize --pid <PIDPATH> --create-review-history-table --create-review-table --review <DSNINFO>t=review --review-history t=review_history --since 0 --nozero-admin --report-all --iterations 0 --noreport --limit 100% <LOGPATH>

yet it just collects data (and ignores --since? it collects all from start.), writes to the table, and exits.

Has anyone else tried something like this? Is pt-q-d able to do this? Will I need to hack it a bunch?


  • mirfanmirfan Database Administrator Inactive User Role Beginner
    pt-query-digest has --since --until parameters. It is like log queries from that particular timestamp (--since) till that end of time (--until).
    Is that what you looking for ?
  • Trey RaymondTrey Raymond Entrant Inactive User Role Beginner
    Nah, I need it to watch from launch (--since 0, basically) and stay running in the background, watching the log, as a slow query tracking daemon that would connect and log to a central monitoring server.
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.