使用mysqladmin获取性能指标

[mysql@mysql1 ~]$ mysqladmin -usystem -p123456 -S /data/mysqldata/3306/mysql.sock extended-status -r -i 1 | grep "Questions"

| Questions                                     | 23          |

| Questions                                     | 1           |

通过灵活使用mysqladmin命令,可以获取MySQL实例每秒查询、更新、删除数量等指标。-r,-I 1的意思是能够自动将状态变量本次输出的参数值与前次参数值相减,输出两者之间的差值,每个1秒获取一次参数值

[mysql@mysql1 ~]$ mysqladmin -usystem -p123456 -S /data/mysqldata/3306/mysql.sock extended-status -r -i 1 | grep -E "Com_select|Com_update|Com_delete"

| Com_delete                                    | 0           |

| Com_delete_multi                              | 0           |

| Com_select                                    | 6           |

| Com_update                                    | 0           |

| Com_update_multi                              | 0           |

 

 

你可能感兴趣的:(mysqladmin)