upda
This commit is contained in:
parent
5ba8667f78
commit
66f15b3920
15
checkstat.sh
15
checkstat.sh
|
|
@ -2,9 +2,14 @@
|
|||
|
||||
while true :
|
||||
do
|
||||
date
|
||||
date "+%Y-%m-%d %H:%M:%S"
|
||||
hostbusy=$(cat /sys/class/scsi_host/host3/host_busy)
|
||||
echo "---- hostbusy is $hostbusy"
|
||||
echo host state: $(cat /sys/class/scsi_host/host3/state)
|
||||
ps aux | grep -w sh | grep D
|
||||
echo fio: $(ps aux | grep -c fio)
|
||||
|
||||
echo -e "disk\tblocked\tbusy\tstate\ttimeout\tiorequest_cnt\tiodone_cnt\tinflight"
|
||||
for dev in `lsscsi | grep scsi_debug | awk '{print $6}'`; do
|
||||
disk=$(basename $dev)
|
||||
iorequest_cnt=$(cat /sys/block/$disk/device/iorequest_cnt)
|
||||
|
|
@ -13,11 +18,9 @@ do
|
|||
state=$(cat /sys/block/$disk/device/state)
|
||||
inflight=$(cat /sys/block/$disk/inflight)
|
||||
device_blocked=$(cat /sys/block/$disk/device/device_blocked)
|
||||
echo "disk\tdevice_blocked\tstate\ttimeout\t\iorequest_cnt\tiodone_cnt\tinflight"
|
||||
echo "$disk $device_blocked $state $timeout $iorequest_cnt $iodone_cnt $inflight"
|
||||
device_busy=$(cat /sys/block/$disk/device/device_busy)
|
||||
echo -e "$disk\t$device_blocked\t$device_busy\t$state\t $timeout\t$iorequest_cnt\t$iodone_cnt $inflight"
|
||||
done
|
||||
ps aux | grep -w sh | grep D
|
||||
nr_fio=$(ps aux | grep -c fio)
|
||||
echo fio: $nr_fio
|
||||
echo
|
||||
sleep $1
|
||||
done
|
||||
|
|
|
|||
Loading…
Reference in New Issue