WEB开发网
开发学院数据库MySQL Linux命令行下快速监控mysql 阅读

Linux命令行下快速监控mysql

 2009-10-19 00:00:00 来源:WEB开发网   
核心提示:其实很简单,就是利用linux下的 watch 工具来做监控,Linux命令行下快速监控mysql,方法如下:[yejr@localhostimysql]#watch-d-n10"egrep'MySQLthread|Log|Modifieddbpages'innodb_status.3249&

其实很简单,就是利用linux下的 watch 工具来做监控,方法如下:

[yejr@localhost imysql]# watch -d -n 10 "egrep 'MySQL thread|Log|Modified db pages' innodb_status.3249 "   
Every 10.0s: egrep 'MySQL thread|Log|Modified db pages' innodb_status.3249                        Thu Apr 9 10:01:12 2009 
 
MySQL thread id 6, query id 71 localhost root Sending data 
Log sequence number 2703 3443241402 
Log flushed up to  2703 3442763607 
Modified db pages    83325 

或者:

[yejr@localhost imysql]#watch -d -n 10 "mysqladmin ext|egrep Innodb_data"   
Every 10.0s: mysqladmin ext|egrep Innodb_data                                       Thu Apr 9 10:03:55 2009 
| Innodb_data_fsyncs        | 4144699   | 
| Innodb_data_pending_fsyncs    | 0      | 
| Innodb_data_pending_reads     | 0      | 
| Innodb_data_pending_writes    | 0      | 
| Innodb_data_read         | 5567172608 | 
| Innodb_data_reads         | 298413   | 
| Innodb_data_writes        | 4492881   | 
| Innodb_data_written        | 18549422080 | 

参数解释:

-d --differences 
-n --interval 

不用我多说了吧,怎么样,是不是觉得很有意思

http://imysql.cn

Tags:Linux 命令 快速

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接