Check Disk Unix I/O

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
murawweh.daher
Posts: 66
Joined: Wed Sep 02, 2015 2:02 pm
Location: Ramallah - West Bank
Contact:

Re: Check Disk Unix I/O

Post by murawweh.daher »

Hi,

/opt/nagios/libexec/check_iostat_orig -d emcpower3001a -w 1,2,3 -c 2,3,4
ERROR: Device incorrectly specified

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)


#pwd
/dev/rdsk
#ls
emcpower3001a
emcpower3002a
Regards,
Murawweh Daher
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check Disk Unix I/O

Post by rkennedy »

How do you have your drives mounted?
/opt/nagios/libexec/check_iostat_orig -d emcpower3001a -w 1,2,3 -c 2,3,4
ERROR: Device incorrectly specified
What is the result if you run /opt/nagios/libexec/check_iostat_orig -d /dev/rdsk -w 1,2,3 -c 2,3,4?
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

Post by murawweh.daher »

/opt/nagios/libexec/check_iostat_orig -d /dev/rdsk -w 1,2,3 -c 2,3,4
ERROR: Device incorrectly specified

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)

/opt/nagios/libexec/check_iostat_orig:
-d <disk> Device to be checked (without the full path, eg. sda)
-c <tps>,<read>,<wrtn>,<await> Sets the CRITICAL level for tps, KB_read/s, KB_written/s and average wait, respectively
-w <tps>,<read>,<wrtn>,<await> Sets the WARNING level for tps, KB_read/s, KB_written/s and average wait, respectively


our solaris 11 is OVM servers.
Regards,
Murawweh Daher
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check Disk Unix I/O

Post by lmiltchev »

Run the following commands on the Solaris machine, and show us the output:

Code: Select all

df
iostat
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

Post by murawweh.daher »

Hi, please find the output below.

Code: Select all

#df
/                  (rpool/ROOT/zbe-0  ):48668092 blocks 48668092 files
/var               (rpool/ROOT/zbe-0/var):48668092 blocks 48668092 files
/.SUNWnative/lib   (/.SUNWnative/lib  ):216886151 blocks 216886151 files
/.SUNWnative/platform(/.SUNWnative/platform):216886151 blocks 216886151 files
/.SUNWnative/sbin  (/.SUNWnative/sbin ):216886151 blocks 216886151 files
/.SUNWnative/usr   (/.SUNWnative/usr  ):216886151 blocks 216886151 files
/dev               (/dev              ):       0 blocks        0 files
/proc              (proc              ):       0 blocks    62670 files
/system/contract   (ctfs              ):       0 blocks 2147483139 files
/etc/mnttab        (mnttab            ):       0 blocks        0 files
/system/object     (objfs             ):       0 blocks 2147483374 files
/etc/svc/volatile  (swap              ):31801248 blocks 69227477 files
/dev/fd            (fd                ):       0 blocks        0 files
/tmp               (swap              ):31801248 blocks 69227477 files
/var/run           (/etc/svc/volatile/):31801248 blocks 69227477 files
/apps              (apps              ):61415175 blocks 61415175 files
/backup            (backup            ):79877379 blocks 79877379 files
/export            (rpool/export      ):48668092 blocks 48668092 files
/export/home       (rpool/export/home ):48668092 blocks 48668092 files
/install           (install           ): 8156564 blocks  8156564 files
/ora_tst2          (ora_tst2          ):115529116 blocks 115529116 files
/oracle            (oracle            ):207759874 blocks 207759874 files
/orafin            (orafin            ):37345684 blocks 37345684 files
/rpool             (rpool             ):48668092 blocks 48668092 files
/stage             (rpool/stage       ):48668092 blocks 48668092 files
/u01_uat           (u01_uat           ):97908184 blocks 97908184 files
/arcdest1          (10.201.64.34:/export/arcdest1):1236219761 blocks 1236219761                                                                                                                      files





#iostat
   tty        sd3           sd4           sd5           sd6            cpu
 tin tout kps tps serv  kps tps serv  kps tps serv  kps tps serv   us sy wt id
   0 1019 333  35    2  333  35    2    0   0    4    0   0    5    1  1  0 98
Last edited by tmcdonald on Tue Apr 05, 2016 11:09 am, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
Regards,
Murawweh Daher
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Check Disk Unix I/O

Post by tgriep »

It looks like script was hard coded to only test devices under /dev
to fix that, edit the script and change the following line from

Code: Select all

[ ! -b "/dev/$disk" ] && echo "ERROR: Device incorrectly specified" && help
to

Code: Select all

[ ! -d "$disk" ] && echo "ERROR: Device incorrectly specified" && help
Save it and see if that works for you.

If this doesn't work, you may want to contact the author of the plugin.
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

Post by murawweh.daher »

Hi,

i modified the script and it's working now.
i compare the disk name between (iostat -nx) and /dev/dsk to be able read the path with correct device name.
Regards,
Murawweh Daher
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check Disk Unix I/O

Post by rkennedy »

Good to hear! Are we good to mark this thread as resolved then?
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

Post by murawweh.daher »

yes, solved
Regards,
Murawweh Daher
Locked