pt-query-digest - output into file


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?
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.

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


Thank you it worked!

Finaly can analyze large log with many explains.
Maybe adding some tutorial article for absolute begginers would help more people