pt-query-digest –limit 100 ~/Desktop/mysql-slow.log.2 ~/Desktop/mysql-slow.log.1 ~/Desktop/mysql-slow.log >> ~/Desktop/slow-log-statistics-3d.txt
You have to find on the internet, download and install the program first
you can directly mail like:
pt-query-digest –limit 50 /var/log/mysql/mysql-slow.log | mailx -s “performance charts from the X Server” “programer@test.com”