From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 1/2] hddshutdown: Update script for new iostat output format - Bug#12702 Date: Fri, 08 Oct 2021 23:38:23 +0200 Message-ID: <20211008213824.2754445-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1476650324220187873==" List-Id: --===============1476650324220187873== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable - 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 =3D split(/\//,$_); $diskstats =3D `cat /var/run/hddstats-$array[$#array] 2>/dev/null`; chomp $diskstats; - $newdiskstats =3D `iostat -d -t $_ | tail -2 | head -1 | awk '{ print \$= 5","\$6}'`; + $newdiskstats =3D `iostat -d -t $_ | tail -3 | head -1 | awk '{ print \$= 6","\$7}'`; chomp $newdiskstats; $status =3D `hdparm -C /dev/$_ | tail -1 | cut -d: -f2`; chomp $status; --=20 2.33.0 --===============1476650324220187873==--