Page 1 of 2
Check Disk Unix I/O
Posted: Wed Mar 23, 2016 5:36 am
by murawweh.daher
Hello,
i installed nrpe agent on solaris10 and want to check disk i/o, i tried to use check_iostat plugin but everytime have error as below.
what is the best way to check disk load for solaris 10?
./check_iostat -h
./check_iostat: function: not found
-e
This plugin shows the I/O usage of the specified disk, using the iostat external program.
It prints three statistics: Transactions per second (tps), Kilobytes per second
read from the disk (KB_read/s) and and written to the disk (KB_written/s)
./check_iostat:
-d <disk> Device to be checked (without the full path, eg. sda)
-c <tps>,<read>,<wrtn> Sets the CRITICAL level for tps, KB_read/s and KB_written/s, respectively
-w <tps>,<read>,<wrtn> Sets the WARNING level for tps, KB_read/s and KB_written/s, respectively
./check_iostat: -1: bad number
Re: Check Disk Unix I/O
Posted: Wed Mar 23, 2016 8:56 am
by rkennedy
What version of the check_io script are you running?
Re: Check Disk Unix I/O
Posted: Thu Mar 24, 2016 2:30 am
by murawweh.daher
!/bin/sh
#
# Version 0.0.2 - Jan/2009
# Changes: added device verification
#
# by Thiago Varela -
[email protected]
please find attached file (please remove .txt just for uploading)
Re: Check Disk Unix I/O
Posted: Thu Mar 24, 2016 12:57 pm
by tgriep
If you edit that plugin and remove the following lines from it, that message will go away.
Code: Select all
function help {
echo -e "\n\tThis plugin shows the I/O usage of the specified disk, using the iostat external program.\n\tIt prints three statistics: Transactions per second (tps), Kilobytes per second\n\tread from the disk (KB_read/s) and and written to the disk (KB_written/s)\n\n$0:\n\t-d <disk>\t\tDevice to be checked (without the full path, eg. sda)\n\t-c <tps>,<read>,<wrtn>\tSets the CRITICAL level for tps, KB_read/s and KB_written/s, respectively\n\t-w <tps>,<read>,<wrtn>\tSets the WARNING level for tps, KB_read/s and KB_written/s, respectively\n"
exit -1
}
Solaris's command shell doesn't work with functions used in scripts.
Try that and see if it works for you.
Re: Check Disk Unix I/O
Posted: Thu Mar 24, 2016 6:44 pm
by murawweh.daher
./check_iostat -d / -w 1,2,3 -c 2,3,4
ERROR: Device incorrectly specified
./check_iostat: help: not found
./check_iostat: test: unknown operator ==
./check_iostat: [[: not found
./check_iostat: [[: not found
./check_iostat: [[: not found
./check_iostat: : cannot execute
./check_iostat: test: unknown operator 2 | bc
./check_iostat: : cannot execute
./check_iostat: test: unknown operator 1 | bc
OK - I/O stats tps= KB_read/s= KB_written/s= | 'tps'=; 'KB_read/s'=; 'KB_written/s'=;
Re: Check Disk Unix I/O
Posted: Fri Mar 25, 2016 9:39 am
by rkennedy
murawweh.daher wrote:./check_iostat -d / -w 1,2,3 -c 2,3,4
ERROR: Device incorrectly specified
./check_iostat: help: not found
./check_iostat: test: unknown operator ==
./check_iostat: [[: not found
./check_iostat: [[: not found
./check_iostat: [[: not found
./check_iostat: : cannot execute
./check_iostat: test: unknown operator 2 | bc
./check_iostat: : cannot execute
./check_iostat: test: unknown operator 1 | bc
OK - I/O stats tps= KB_read/s= KB_written/s= | 'tps'=; 'KB_read/s'=; 'KB_written/s'=;
I believe it's looking for a mount, not just /.
Code: Select all
-d <disk> Device to be checked (without the full path, eg. sda)
Re: Check Disk Unix I/O
Posted: Sat Mar 26, 2016 8:24 am
by murawweh.daher
i tried without full path and same issue.
Re: Check Disk Unix I/O
Posted: Mon Mar 28, 2016 9:19 am
by lmiltchev
Use "sda", instead of "/". Example:
Code: Select all
[root@192 tmp]# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 9.4G 6.1G 3.3G 66% /
devtmpfs 2.0G 140K 2.0G 1% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sda1 9.4G 6.1G 3.3G 66% /
[root@192 tmp]# ./check_iostat.sh -d sda1 -w 1,2,3 -c 2,3,4
CRITICAL - I/O stats tps=7.46 KB_read/s=3.35 KB_written/s=174.58 | 'tps'=7.46; 'KB_read/s'=3.35; 'KB_written/s'=174.58;
Re: Check Disk Unix I/O
Posted: Tue Mar 29, 2016 12:51 am
by murawweh.daher
i test on Linux and worked fine.
./check_iostat -c 20,20,20 -w 10,10,10 -d sda
CRITICAL - I/O stats tps=232.33 KB_read/s=238.10 KB_written/s=5615.89 | 'tps'=232.33; 'KB_read/s'=238.10; 'KB_written/s'=5615.89;
but on Solaris 10 didn't work.
Re: Check Disk Unix I/O
Posted: Tue Mar 29, 2016 11:47 am
by rkennedy
Can you post the full input / output when you attempt it on the Solaris machine?