Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #!/usr/bin/bash
  2.  
  3. #export PATH=$PATH:/x/home/mysql/product/mysql/bin/mysql
  4. #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
  5.  
  6. 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