Check Disk Unix I/O
-
murawweh.daher
- Posts: 66
- Joined: Wed Sep 02, 2015 2:02 pm
- Location: Ramallah - West Bank
- Contact:
Check Disk Unix I/O
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
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
Regards,
Murawweh Daher
Murawweh Daher
-
murawweh.daher
- Posts: 66
- Joined: Wed Sep 02, 2015 2:02 pm
- Location: Ramallah - West Bank
- Contact:
Re: Check Disk Unix I/O
!/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)
#
# 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)
You do not have the required permissions to view the files attached to this post.
Regards,
Murawweh Daher
Murawweh Daher
Re: Check Disk Unix I/O
If you edit that plugin and remove the following lines from it, that message will go away.
Solaris's command shell doesn't work with functions used in scripts.
Try that and see if it works for you.
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
}Try that and see if it works for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
murawweh.daher
- Posts: 66
- Joined: Wed Sep 02, 2015 2:02 pm
- Location: Ramallah - West Bank
- Contact:
Re: Check Disk Unix I/O
./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'=;
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'=;
Regards,
Murawweh Daher
Murawweh Daher
Re: Check Disk Unix I/O
I believe it's looking for a mount, not just /.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'=;
Code: Select all
-d <disk> Device to be checked (without the full path, eg. sda)
Former Nagios Employee
-
murawweh.daher
- Posts: 66
- Joined: Wed Sep 02, 2015 2:02 pm
- Location: Ramallah - West Bank
- Contact:
Re: Check Disk Unix I/O
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;Be sure to check out our Knowledgebase for helpful articles and solutions!
-
murawweh.daher
- Posts: 66
- Joined: Wed Sep 02, 2015 2:02 pm
- Location: Ramallah - West Bank
- Contact:
Re: Check Disk Unix I/O
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.
./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.
Regards,
Murawweh Daher
Murawweh Daher
Re: Check Disk Unix I/O
Can you post the full input / output when you attempt it on the Solaris machine?
Former Nagios Employee