Forum Discussion

patonbike_25784's avatar
patonbike_25784
Icon for Nimbostratus rankNimbostratus
Feb 15, 2018

MySQL 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

1 Reply

  • 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.