Forum Discussion
patonbike
Cirrus
Feb 15, 2018MySQL processlist through F5
I have found a "work around" to get your processlist through F5 so that you are not just looking at your F5's self IPs. Useful for when trying to figure out what real client is connecting to your DB.
ssh admin@YOUR_PRIMARY_BIGIP "tmsh show sys conn cs-server-addr YOUR_MYSQL_VIRTUAL_SERVER_IP" > iplist.txt
mysql -u root -pPASSWORD -e 'show processlist' > proclist.txt
for i in `cat iplist.txt|awk '{print $1}'|grep -v Total|grep -v Sys`; do port=`echo -n $i|awk -F: '{print $2}'`; grep $port proclist.txt|sed "s/YOUR_BIGIP_MYSQLVLAN_SELF_IP:$port/$i/"; done
- patonbike
Cirrus
I would post a sample output, but I really don't want to show any of this info. The nice thing here is it now only shows what client IP is connecting but what they are doing and what login they are using.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects