标签:egrep bash stat done pre gre long wc -l while
#!/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
标签:egrep bash stat done pre gre long wc -l while
原文地址:https://www.cnblogs.com/persisit/p/13693709.html