aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2021-03-08 16:30:53 +0100
committerFlorian Eckert <fe@dev.tdt.de>2021-03-16 13:23:08 +0100
commit543a2a970c062c30ac33f49f67ea952eb0adbed3 (patch)
tree9eba820a4c97da28936f11a68c40a7f6ff49c2c9 /utils
parent092902a87ee14e3b4b0b37a4ddb81719ae27fcc8 (diff)
collectd: fix smart disk detection
On my system the attribute DEVTYPE was not set. The plugin could not read any data and the function call blocked forever on this function and did not returned. By removing it, all block devices under `/sys/class/block` were checked. Block devices that do not support SMART were not evaluated. The collected displays the following message. smart plugin: checking SMART status of /dev/loop4. smart plugin: unable to open /dev/loop4. If you do not like this message, you could only enable device in the uci that does support SMART. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'utils')
-rw-r--r--utils/collectd/patches/933-fix-smart-detection.patch10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/collectd/patches/933-fix-smart-detection.patch b/utils/collectd/patches/933-fix-smart-detection.patch
new file mode 100644
index 000000000..70250d61b
--- /dev/null
+++ b/utils/collectd/patches/933-fix-smart-detection.patch
@@ -0,0 +1,10 @@
+--- a/src/smart.c
++++ b/src/smart.c
+@@ -610,7 +610,6 @@ static int smart_read(void) {
+ return -1;
+ }
+ udev_enumerate_add_match_subsystem(enumerate, "block");
+- udev_enumerate_add_match_property(enumerate, "DEVTYPE", "disk");
+ udev_enumerate_scan_devices(enumerate);
+ devices = udev_enumerate_get_list_entry(enumerate);
+ if (devices == NULL) {