今天優化Box Anemometer慢日志導入的腳本,在調試時pt-query-digest一直卡在Reading from STDIN ...不動,而別一臺機器順利執行成功。 查看幫助
pt-query-digest --help
pt-query-digest analyzes MySQL queries from slow, general, and binary log files.
It can also analyze queries from C<SHOW PROCESSLIST> and MySQL protocol data
from tcpdump. By default, queries are grouped by fingerprint and reported in
descending order of query time (i.e. the slowest queries first). If no C<FILES>
are given, the tool reads C<STDIN>. The optional C<DSN> is used for certain
options like L<"--since"> and L<"--until">. For more details, please use the
--help option, or try 'perldoc /usr/local/percona-toolkit/bin/pt-query-digest'
for complete documentation.
意思是如果沒有給定FILE則等待輸入,ls命令驗證是文件不存在,原因是跟另一臺機器的文件名不一樣,拷貝命令過來直接執行肯定不行啦,把文件名改為本機的慢日志名稱即可執行完成
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。