linux系统shell脚本过滤段落内容

2014-02-27 14:03:18Linux媛媛

在研究show engine innodb status 输出信息,为了看其中的insert buffer部分信息,写了个脚本

# mysql -uroot -e ‘show engine innodb status \G’ |grep -E -A8 -B1 --color ‘INSERT BUFFER’

-------------------------------------

INSERT BUFFER AND ADAPTIVE HASH INDEX

-------------------------------------

Ibuf: size 37064, free list len 21130, seg size 58195, 22172798 merges

merged operations:

insert 88714186, delete mark 32775614, delete 18942413

discarded operations:

insert 9204, delete mark 8597, delete 12

Hash table size 42499631, node heap has 151066 buffer(s)

3275.24 hash searches/s, 647.12 non-hash searches/s

相关教程
图文教程