Ticket #848 (new defect)

Opened 2 years ago

Last modified 2 years ago

hddtemp_smartctl plugin erroneously involves IDE drives without smart_values

Reported by: feiner.tom Assigned to: feiner.tom
Priority: normal Milestone: Munin 1.4.4
Component: plugins Version: 1.4.3
Severity: normal Keywords:
Cc: prohlep@math.bme.hu

Description

Forwarded from debian bug: http://bugs.debian.org/566767

If /dev/hda is a HDD with smart capabilities, and /dev/hdc a DVD/CD without smart capabilities, then the perl script

/usr/share/munin/plugins/hddtemp_smartctl

# Try to get a default set of drives .... ... ...

my @drivesIDE; if (-d '/proc/ide') {

opendir(IDE, '/proc/ide'); @drivesIDE = grep /hd[a-z]/, readdir IDE; closedir(IDE);

}

.... ... ...

will involve the DVD/CD, and the corresponding graph will contain a line of

hdc nan nan nan nan

which is obviously superfluous.

I know, that there is a possibility to configure, what drives will be involved, however the perl script above could check for the existence of

/proc/ide/hd[a-z]/smart_values

which does exist for hda having smart capabilities, and does not exist for hdc having no smart capabilities.

In fact, the perls script grabs close to this information, namely tampers at /proc/ide/hd[a-z].

Thanks,

Peter.

Change History

01/25/10 22:32:53 changed by feiner.tom

Hi Peter,

Thanks for the bug report!

/proc/ide/hd[a-z]/smart_values is indeed a very nice way to to identify smart capabilities, but now that I've looked at the plugin a bit, it looks like the problem here is that when the plugin is run with autoconf, it actually checks the capabilities using smartctl (or hdparm as fallback), but when running it with the config parameter, no checks are performed on the drives.

Your suggestion will solve the issue for the IDE drives, but we need a generic way to identify scsi disks as well ,and also freebsd and solaris drives.

So I think the best generic option is to simply add the smartct/hdparm capability checks to the config section which will configure only smart enabled drives.

I'll write a patch as soon as I have some free time.

Regards,

Tom Feiner