Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- (/usr/local/bin/db2log | \
- mk-query-digest --fingerprints \
- --filter '$event->{user} !~ m/^(bi|memonic)$/') 2>&1 | \
- mail -s "MySQL slow logs" root
- # Rotate slow logs. Will move them into the backup table slow_log_backup. If
- # that table exists it's overwritten with the primary slow log.
- # So with this strategy we can still access yesterday's slow log by querying
- # slow_log_backup.
- mysql mysql -e 'CALL rds_rotate_slow_log'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement