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

HELP pt-query-digest for PROCESSLIST

kpanacy_olbkpanacy_olb EntrantCurrent User Role Beginner
Hello, I used Maatkit before it became Percona Toolkit and could regularly run this:

mk-query-digest --processlist h=host,D=db,u=uname,p=pwd --print --interval 0.5 > /tmp/process_qry.log

When I try to run pt-query-digest the same way I get a message that --print is no longer valid. When I run it without --print just says "Reading from STDIN ..." and never actually records anything.

$>pt-query-digest --processlist h=host,D=db,u=uname,p=pwd --interval 0.5 > /tmp/process_qry.log

Wait 10 minutes, then

$>cat /tmp/process_qry.log

Reading from STDIN ...

What am I doing wrong?



  • carlos.salguerocarlos.salguero Percona Toolkit Developer Percona Staff Role

    I've tested pt-query-digest and I wasn't able to reproduce the problem.
    I ran
    bin/pt-query-digest --processlist h=localhost --interval=0.01 --output slowlog
    Then I ran some queries on that MySQL instance and I am was able to get an output:
    Reading from STDIN ...
    # Time: 2017-02-21T16:31:31
    # User@Host: root[root] @ localhost []
    # Query_time: 0.020595  Lock_time: 0.000000  Rows_sent: 0  Rows_examined: 0
    use db_facturacion;
    select * from clientes;
    Could you run it enabling the debug mode?
    It will produce a HUGE amount of data so be careful, don't redirect the output, just check is there is any major error being reported.
    Also, could you specify the toolkit version you are using? You can get the version using:
    [code]pt-query-digest --version

  • kpanacy_olbkpanacy_olb Entrant Current User Role Beginner
    Thanks for the reply.

    [~]$ pt-query-digest --version
    pt-query-digest 2.2.20

    I just tested byadding "--output slowlog" and now it works!

    Thanks very much!!!
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.