You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# await = The average time (in milliseconds) for I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.
# IMPORTANT: Requires iostat
#Example
#./check_io_disk.sh sdc 20.0 28.0
# OK - Disk sdc await time is 8.0 ms | await=8.0
DISK=$1
WARN=$2
CRIT=$3
R=$(iostat -d $DISK -xmt 2 4 | awk '{ sum += $10; n++ } END { if (n > 0) print sum / n; }' |cut -c 1-3)
if [ -z $R ]; then
echo "UNKOWN - Error to get iostat info for disk $DISK"