Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/bash
- #export PATH=$PATH:/x/home/mysql/product/mysql/bin/mysql
- #mysql --login-path=mysqlconn --batch --skip-column-names -e "select * from information_schema.processlist where user not in ('root','repl','system user') and host like '10.72.12.201%'" | while IFS= read -r line; do printf '%s %s\n' "$(date '+%Y-%m-%d %H:%M:%S')" "$line"; done | tee -a $log_dir/connection_metrics.log
- mysql --login-path=mysqlconn --batch --skip-column-names -e "select now(),count(*) from information_schema.processlist where user not in ('root','repl','system user');" | tee -a /tmp/connection_metrics.log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement