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