ports路径:/usr/ports/databases/mytop
mytop说明:一个显示mysql性能的工具,mytop - display MySQL server performance info like `top'
使用方法:mytop -h192.168.10.10 -utest -ptest
颜色代表的含义:
Query - 黄色
Sleep - 白色
Connect - 绿色
支持如下命令:
d:显示连接到特定数据库的线程
f:Given a thread id, display the entire query that thread was (and still may be) running.
F:取消所有过滤条件
h:Only show queries from a particular host.
H:Toggle the header display. You can also specify either "header=0" or "header=1" in your config file to set the default behavior.
i:Toggle the display of idle (sleeping) threads. If sleeping threads are filtered, the default sorting order is reversed so that the longest running queries appear at the top of the list.
I:Switch to InnoDB Status mode. The output of "SHOW INNODB STATUS" will be displayed every cycle. In a future version, this may actually summarize that data rather than producing raw output. k Kill a thread.
m:Toggle modes. Currently this switches from `top' mode to `qps'(Queries Per Second Mode). In this mode, mytop will write out one integer per second. The number written reflects the number of queries executed by the server in the previous one second interval. More modes may be added in the future.
o:Reverse the default sort order.
p:暂停
q:退出mytop
u Show only threads owned by a giver user.The s key has a command-line counterpart: -s.
The h key has two command-line counterparts: -header and -noheader.