From patchwork Fri Oct 8 21:38:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 4770 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4HR1lk0LYxz3xCR for ; Fri, 8 Oct 2021 21:38:42 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4HR1lj03FZz15D; Fri, 8 Oct 2021 21:38:40 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4HR1lh5M6kz2yWb; Fri, 8 Oct 2021 21:38:40 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4HR1lg3fwKz2yS8 for ; Fri, 8 Oct 2021 21:38:39 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4HR1lf6RhSzsv; Fri, 8 Oct 2021 21:38:38 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1633729119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5YihRK3ngQH4FdGG0W5y7h+VH71pt2KO2lO3N69Vlx8=; b=/U556cK59n4eFGbTehpz19LTqKqtsxTyZWiyM8Q2+e6uuujAglwx3zSycfo5mW3KVJ8YAb XatQSxdsEtWRndDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1633729119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5YihRK3ngQH4FdGG0W5y7h+VH71pt2KO2lO3N69Vlx8=; b=mKUBi+LmZEFpCFggMrBx1Xnom0foaVAgiWjPQ1g/FHT4SXb48S+ePtCYNi2EK6OZC3PNfG 3e+XJqZ1vwvk/oE5l0R2Cy1cAkt2NLu7YYNKciUMdkpQN5MzSelQKJ84+jWWFFeYTbh29y V0vPkit2kqz01luo4SpWZc/KRSfOPvf8Hzjt2dTbc27cO7TeGE63Hek5YyC8irKgnr9ai8 pufznTPAipPT1oA8kl2YSMfGkmDxzSpROkf35DJsVWcSNT1xM8Q2BqwxY95Rv1yYVNdNyi 8Ob7t/7kQlvn1FlNwUDwO2Nb5+bgiO2ANV36IfGg8JGMYRgcYfjVJ1TmWbr1tg== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 1/2] hddshutdown: Update script for new iostat output format - Bug#12702 Date: Fri, 8 Oct 2021 23:38:23 +0200 Message-Id: <20211008213824.2754445-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - Modification of iostat line as per input in Bug#12702 Fixes: 12702 Signed-off-by: Adolf Belka --- src/scripts/hddshutdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/hddshutdown b/src/scripts/hddshutdown index 146cc7347..ce345e374 100644 --- a/src/scripts/hddshutdown +++ b/src/scripts/hddshutdown @@ -36,7 +36,7 @@ foreach (@devices){ my @array = split(/\//,$_); $diskstats = `cat /var/run/hddstats-$array[$#array] 2>/dev/null`; chomp $diskstats; - $newdiskstats = `iostat -d -t $_ | tail -2 | head -1 | awk '{ print \$5","\$6}'`; + $newdiskstats = `iostat -d -t $_ | tail -3 | head -1 | awk '{ print \$6","\$7}'`; chomp $newdiskstats; $status = `hdparm -C /dev/$_ | tail -1 | cut -d: -f2`; chomp $status;