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

pt-query-digest - output into file

PeterPPeterP EntrantCurrent User Role Beginner
Hello,

im new to percona toolkit, even after googling for hours i could not find answer.

How can i save output of pt-query-digest into file?
Here http://www.percona.com/doc/percona-toolkit/2.2/pt-query-digest.html
documentation say it should look like this pt-query-digest --log output.log msqlslow.log

but it just dont work output.log file stays empty.

Thx very much for answer.

Comments

  • scott.nemesscott.nemes MySQL Sage Current User Role Patron
    Hi PeterP;

    The --output parameter is used to specify the output type, not location. How you direct the output into a file would depend on what operating system you are running it on. For a Linux type system, simply add "> filename.txt" to the end of your command, such as:

    pt-query-digest my-slow-query.log > my-slow-query-log.digest

    -Scott
  • PeterPPeterP Entrant Current User Role Beginner
    Thank you it worked!

    Finaly can analyze large log with many explains.
    Maybe adding some tutorial article for absolute begginers would help more people
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.