Is there any way to see the command SHOW PROCESSLIST
of X in X seconds, from the command line?
I'm using the Ubuntu 16 Operating System.
Is there any way to see the command SHOW PROCESSLIST
of X in X seconds, from the command line?
I'm using the Ubuntu 16 Operating System.
You can use the command mysqladmin -u root -p -i 1 processlist
, where:
-u
user -p
will be asked the password -i 1
interval in seconds The result will look something like this:
+----+------+-----------+----+---------+------+----------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------+----+---------+------+----------+------------------+
| 76 | root | localhost | | Query | 0 | starting | show processlist |
+----+------+-----------+----+---------+------+----------+------------------+
reference: MySQL: Show processlist every second