IO队列长度监控

时间:2020-09-21 11:55:46   收藏:0   阅读:45

IO队列长度监控

#!/bin/bash

io () {
  device_num=`iostat -x | egrep "^sd[a-z]"` | wc -l
  iostat -x 1 3 | egrep "^sa[a-z]" | tail -n +$((device_num+1)) | awk ‘{io_long[$1]+=$9}END{for (i in io_long)print (io_long[i], i)}‘ 
}


#while true
#do
  io
#  sleep 5
#done

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!