From 3ce672abb8bb25e4f10327dec1510c184f41b2d7 Mon Sep 17 00:00:00 2001 From: bergware Date: Tue, 18 Jul 2017 19:27:11 +0200 Subject: [PATCH] Prevent unassigned devices from spinning up unnecessary --- plugins/dynamix/scripts/monitor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dynamix/scripts/monitor b/plugins/dynamix/scripts/monitor index bd673d354..23c9e62a9 100755 --- a/plugins/dynamix/scripts/monitor +++ b/plugins/dynamix/scripts/monitor @@ -259,7 +259,7 @@ foreach ($devs as $dev) { $name = $dev['device']; if (empty($name)) continue; $smart = "/var/local/emhttp/smart/$name"; - if (!file_exists($smart) || (time()-filemtime($smart)>=$var['poll_attributes'])) exec("smartctl -n standby -A ".escapeshellarg("/dev/$name")." > ".escapeshellarg($smart)); + if (!file_exists($smart) || (time()-filectime($smart)>=$var['poll_attributes'])) exec("smartctl -n standby -A ".escapeshellarg("/dev/$name")." > ".escapeshellarg($smart)); $temp = exec("awk '\$1==190||\$1==194{print \$10;exit}' ".escapeshellarg($smart)); $text = "device $name"; $info = !empty($dev['id']) ? "{$dev['id']} ($name)": "No device identification ($name)";