#566767 munin-node: hddtemp_smartctl plugin erroneously involves IDE drives without smart_values

#566767#5
Date:
2010-01-25 01:23:19 UTC
From:
To:
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.

#566767#10
Date:
2010-01-25 21:28:39 UTC
From:
To:
tags 566767 confirmed
forwarded 566767 http://munin.projects.linpro.no/ticket/848
quit

Hi Peter,

Thanks for noticing this issue and opening the bug!

As this is a munin specific issue and not a debian packaging of munin issue,
I've forwarded the bug upstream [1], so the fix will be applied there and not
only for debian.

I have a few ideas about this bug, which I'll explain in the upstream bug report.

Regards,
    Tom Feiner

[1] http://munin.projects.linpro.no/ticket/848