Hi All,
I’m using the query-digest tool to gather some statistics on a number of busy servers. Currently the problem I have is that pt-query-digest’s memory usage continuously grows, heres how I’m using it.
/usr/sbin/tcpdump -i eth0 port 3306 -s 65535 -x -n -q -tttt |/usr/bin/pt-query-digest --type tcpdump --review u=dbUser,p=dbPass,h=dbHost,D=mk_query_digest,t=query_review --create-review-table --review-history u=dbUser,p=dbPass,h=dbHost,D=mk_query_digest,t=query_review_history --create-review-history-table --run-time-mode clock --run-time 1m --iterations 0 --noreport
I was hoping that after each run specified by --run-time that pt-query-digest would write out the statistics to my query_review database and this would keep the memory usage to 1m’s worth of run time rather than wait until Ctrl-C or iterations is reached.
Any ideas if this is possible and if so how?
Cheers,
Rob