check_ide_smart ioctl error

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
gmdune
Posts: 8
Joined: Thu Feb 24, 2011 11:43 am

check_ide_smart ioctl error

Post by gmdune »

All,

I am receiving an error when I run check_ide_smart:

[root@sr-nagios-01-p libexec]# ./check_ide_smart -d /dev/sda
CRITICAL - SMART_ENABLE: Inappropriate ioctl for device
CRITICAL - SMART_CMD_ENABLE

Can someone please explain the error "CRITICAL - SMART_ENABLE: Inappropriate ioctl for device" and what it is that I'm doing wrong?

Thanks for your help
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_ide_smart ioctl error

Post by abrist »

What version of the nagios-plugins are you running?

Code: Select all

./check_ide_smart -V
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
gmdune
Posts: 8
Joined: Thu Feb 24, 2011 11:43 am

Re: check_ide_smart ioctl error

Post by gmdune »

version number is:

Code: Select all

check_ide_smart v1991 (nagios-plugins 1.4.13)
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: check_ide_smart ioctl error

Post by eloyd »

At the risk of stating the obvious, does your drive support SMART? If it's a RAID array or non-SMART SCSI device, or if you're on a virtual box, most likely it doesn't.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: check_ide_smart ioctl error

Post by lmiltchev »

@gmdune

Did eloyd answer your question?
Be sure to check out our Knowledgebase for helpful articles and solutions!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: check_ide_smart ioctl error

Post by slansing »

I agree with @eloyd, it does not look like your system matches the plugin's requirements, at least at this point.
gmdune
Posts: 8
Joined: Thu Feb 24, 2011 11:43 am

Re: check_ide_smart ioctl error

Post by gmdune »

All,

Thank You for responding and my apologies for taking a long time to respond.

Yes, the disk in fact does support SMART.

Oddly enough, the check now works, for no apparent reason where it didn't work before. I don't think anything's changed, because everything is managed by puppet so I'm not sure what happened.

But now I have another issue:

The check works, but it doesn't catch a problem with a known bad disk. Example...

Code: Select all

[root@toms-app-03-p libexec]# ./check_ide_smart /dev/sdc
Id=  1, Status=47 {PreFailure , OnLine }, Value=200, Threshold= 51, Passed
Id=  3, Status=39 {PreFailure , OnLine }, Value=171, Threshold= 21, Passed
Id=  4, Status=50 {Advisory    , OnLine }, Value=100, Threshold=  0, Passed
Id=  5, Status=51 {PreFailure , OnLine }, Value=200, Threshold=140, Passed
Id=  7, Status=46 {Advisory    , OnLine }, Value=200, Threshold=  0, Passed
Id=  9, Status=50 {Advisory    , OnLine }, Value= 81, Threshold=  0, Passed
Id= 10, Status=50 {Advisory    , OnLine }, Value=100, Threshold=  0, Passed
Id= 11, Status=50 {Advisory    , OnLine }, Value=100, Threshold=  0, Passed
Id= 12, Status=50 {Advisory    , OnLine }, Value=100, Threshold=  0, Passed
Id=192, Status=50 {Advisory    , OnLine }, Value=200, Threshold=  0, Passed
Id=193, Status=50 {Advisory    , OnLine }, Value=200, Threshold=  0, Passed
Id=194, Status=34 {Advisory    , OnLine }, Value=123, Threshold=  0, Passed
Id=196, Status=50 {Advisory    , OnLine }, Value=200, Threshold=  0, Passed
Id=197, Status=50 {Advisory    , OnLine }, Value=197, Threshold=  0, Passed
Id=198, Status=48 {Advisory    , OffLine}, Value=197, Threshold=  0, Passed
Id=199, Status=50 {Advisory    , OnLine }, Value=200, Threshold=  0, Passed
Id=200, Status= 8 {Advisory    , OffLine}, Value=198, Threshold=  0, Passed
OffLineStatus=132 {Suspended}, AutoOffLine=Yes, OffLineTimeout=268 minutes
OffLineCapability=123 {Immediate Auto SuspendOnCmd}
SmartRevision=16, CheckSum=236, SmartCapability=3 {SaveOnStandBy AutoSave}


Smartctl, on the other hand, does find a problem with the disk:

Code: Select all

[root@toms-app-03-p libexec]# smartctl -d ata -a /dev/sdc
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-2.6.18-348.4.1.el5] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital RE4 Serial ATA
Device Model:     WDC WD1003FBYX-01Y7B1
Serial Number:    WD-WMAW30636153
LU WWN Device Id: 5 0014ee 2b153afdc
Firmware Version: 01.01V02
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Fri May 30 13:28:52 2014 CDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x84)	Offline data collection activity
					was suspended by an interrupting command from host.
					Auto Offline Data Collection: Enabled.
Self-test execution status:      ( 121)	The previous self-test completed having
					the read element of the test failed.
Total time to complete Offline
data collection: 		(16080) seconds.
Offline data collection
capabilities: 			 (0x7b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 ( 158) minutes.
Conveyance self-test routine
recommended polling time: 	 (   5) minutes.
SCT capabilities: 	       (0x303f)	SCT Status supported.
					SCT Error Recovery Control supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   171   170   021    Pre-fail  Always       -       4408
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       20
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   081   081   000    Old_age   Always       -       14552
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       19
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       16
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       3
194 Temperature_Celsius     0x0022   122   113   000    Old_age   Always       -       25
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   197   197   000    Old_age   Always       -       563
198 Offline_Uncorrectable   0x0030   197   197   000    Old_age   Offline      -       558
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   198   198   000    Old_age   Offline      -       563

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed: read failure       90%     14360         737059458
# 2  Extended offline    Completed: read failure       90%     13953         737059458
# 3  Extended offline    Completed: read failure       90%     13953         737059458
# 4  Short offline       Completed without error       00%      7791         -
# 5  Short offline       Completed without error       00%      7788         -
# 6  Short offline       Completed without error       00%       972         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
Is there an option I can feed to ./check_ide_smart that will pick this up, or is the check not up to par with smartcl?

Thanks
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_ide_smart ioctl error

Post by abrist »

Before we start looking at the code, could you update to the newest version of nagios-plugins and try this check again? There has been a number of changes since 1.4.x:
http://nagios-plugins.org/downloads/
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
tiagocruz
Posts: 2
Joined: Wed Jan 21, 2015 8:16 am

Re: check_ide_smart ioctl error

Post by tiagocruz »

Hello,

And about this error:

Code: Select all

[root@diveo33 nagios-plugins-2.0.3]# ./plugins/check_ide_smart -V
check_ide_smart v2.0.3 (nagios-plugins 2.0.3)

[root@diveo33 nagios-plugins-2.0.3]# ./plugins/check_ide_smart -d /dev/sdb
CRITICAL - SMART_ENABLE: Input/output error
CRITICAL - SMART_CMD_ENABLE

[root@diveo33 nagios-plugins-2.0.3]# fdisk -l /dev/sdb

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Thanks!!!
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_ide_smart ioctl error

Post by tgriep »

Try running this

Code: Select all

smartctl -a /dev/sdb
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked