1 | mysqladmin -u root -p -i 1 processlist |
-u username
-p you will be promted for a password
-i 1 interval one second
Output will see like this one:
1 2 3 4 5 6 7 8 9 | +--------+------+-------------------+-----+---------+------+-------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +--------+------+-------------------+-----+---------+------+-------+------------------+ | 424111 | db4 | 192.168.2.1:58431 | db4 | Sleep | 15 | | | | 424195 | db4 | 192.168.2.1:50531 | db4 | Sleep | 1 | | | | 424483 | db3 | 192.168.2.1:41503 | db3 | Sleep | 464 | | | | 424490 | db3 | 192.168.2.1:41513 | db3 | Sleep | 443 | | | | 424551 | root | localhost | | Query | 0 | | show processlist | +--------+------+-------------------+-----+---------+------+-------+------------------+ |