How to Search Query Log for SLOW and BAD Queries

Rupert Harwood -

The following bash command will search for any queries listed as BAD or SLOW submitted on February 18 and 19 in 2016 and write them to a file called slow_bad.log in the /clustrix directory of the node on which the command was run..

/opt/clustrix/bin/clx cmd 'grep "^2016-02-1[8,9]" /data/clustrix/log/query.log'| egrep "BAD"\|"SLOW" >/data/clustrix/slow_bad.log
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk